1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-21 20:38:57 +00:00

AndroidDevice: Renamed 'supported_eabis' property to 'supported_abis'

Renamed android device property from 'supported_eabis' to 'supported_abis' to be consistent with linux device.

Updated dex2oat workload to use new property name.
This commit is contained in:
Marc Bonnici 2016-12-09 13:49:39 +00:00
parent 0dfbbae7b6
commit 1477a89ee4
3 changed files with 11 additions and 11 deletions

View File

@ -115,26 +115,26 @@ class AndroidDevice(BaseLinuxDevice): # pylint: disable=W0223
return val return val
@property @property
def supported_eabi(self): def supported_abi(self):
props = self.getprop() props = self.getprop()
result = [props['ro.product.cpu.abi']] result = [props['ro.product.cpu.abi']]
if 'ro.product.cpu.abi2' in props: if 'ro.product.cpu.abi2' in props:
result.append(props['ro.product.cpu.abi2']) result.append(props['ro.product.cpu.abi2'])
if 'ro.product.cpu.abilist' in props: if 'ro.product.cpu.abilist' in props:
for eabi in props['ro.product.cpu.abilist'].split(','): for abi in props['ro.product.cpu.abilist'].split(','):
if eabi not in result: if abi not in result:
result.append(eabi) result.append(abi)
mapped_result = [] mapped_result = []
for supported_eabi in result: for supported_abi in result:
for abi, architectures in ABI_MAP.iteritems(): for abi, architectures in ABI_MAP.iteritems():
found = False found = False
if supported_eabi in architectures and abi not in mapped_result: if supported_abi in architectures and abi not in mapped_result:
mapped_result.append(abi) mapped_result.append(abi)
found = True found = True
break break
if not found and supported_eabi not in mapped_result: if not found and supported_abi not in mapped_result:
mapped_result.append(supported_eabi) mapped_result.append(supported_abi)
return mapped_result return mapped_result
def __init__(self, **kwargs): def __init__(self, **kwargs):

View File

@ -223,7 +223,7 @@ class ApkWorkload(Workload):
self.logger.debug("Found apk with primary abi '{}' on target device".format(target_abi)) self.logger.debug("Found apk with primary abi '{}' on target device".format(target_abi))
# Get host version, primary abi is first, and then try to find supported. # Get host version, primary abi is first, and then try to find supported.
for abi in self.device.supported_eabi: for abi in self.device.supported_abi:
self.apk_file = context.resolver.get(ApkFile(self, abi), self.apk_file = context.resolver.get(ApkFile(self, abi),
version=getattr(self, 'version', None), version=getattr(self, 'version', None),
variant_name=getattr(self, 'variant_name', None), variant_name=getattr(self, 'variant_name', None),

View File

@ -60,8 +60,8 @@ class Dex2oatBenchmark(Workload):
def setup(self, context): def setup(self, context):
if self.device.getprop('persist.sys.dalvik.vm.lib.2') != 'libart.so': if self.device.getprop('persist.sys.dalvik.vm.lib.2') != 'libart.so':
raise WorkloadError('Android system must be using ART (rather than Dalvik) in order for dex2oat to work.') raise WorkloadError('Android system must be using ART (rather than Dalvik) in order for dex2oat to work.')
supported = [eabi == 'armeabi' and 'arm' or eabi.split('-')[0] supported = [abi == 'armeabi' and 'arm' or abi.split('-')[0]
for eabi in self.device.supported_eabi] for abi in self.device.supported_abi]
if self.instruction_set not in supported: if self.instruction_set not in supported:
message = 'Instruction set "{}" is not supported by the device; (supported: {})' message = 'Instruction set "{}" is not supported by the device; (supported: {})'
raise WorkloadError(message.format(self.instruction_set, supported)) raise WorkloadError(message.format(self.instruction_set, supported))