mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +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:
parent
0dfbbae7b6
commit
1477a89ee4
@ -115,26 +115,26 @@ class AndroidDevice(BaseLinuxDevice): # pylint: disable=W0223
|
||||
return val
|
||||
|
||||
@property
|
||||
def supported_eabi(self):
|
||||
def supported_abi(self):
|
||||
props = self.getprop()
|
||||
result = [props['ro.product.cpu.abi']]
|
||||
if 'ro.product.cpu.abi2' in props:
|
||||
result.append(props['ro.product.cpu.abi2'])
|
||||
if 'ro.product.cpu.abilist' in props:
|
||||
for eabi in props['ro.product.cpu.abilist'].split(','):
|
||||
if eabi not in result:
|
||||
result.append(eabi)
|
||||
for abi in props['ro.product.cpu.abilist'].split(','):
|
||||
if abi not in result:
|
||||
result.append(abi)
|
||||
|
||||
mapped_result = []
|
||||
for supported_eabi in result:
|
||||
for supported_abi in result:
|
||||
for abi, architectures in ABI_MAP.iteritems():
|
||||
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)
|
||||
found = True
|
||||
break
|
||||
if not found and supported_eabi not in mapped_result:
|
||||
mapped_result.append(supported_eabi)
|
||||
if not found and supported_abi not in mapped_result:
|
||||
mapped_result.append(supported_abi)
|
||||
return mapped_result
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
@ -223,7 +223,7 @@ class ApkWorkload(Workload):
|
||||
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.
|
||||
for abi in self.device.supported_eabi:
|
||||
for abi in self.device.supported_abi:
|
||||
self.apk_file = context.resolver.get(ApkFile(self, abi),
|
||||
version=getattr(self, 'version', None),
|
||||
variant_name=getattr(self, 'variant_name', None),
|
||||
|
@ -60,8 +60,8 @@ class Dex2oatBenchmark(Workload):
|
||||
def setup(self, context):
|
||||
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.')
|
||||
supported = [eabi == 'armeabi' and 'arm' or eabi.split('-')[0]
|
||||
for eabi in self.device.supported_eabi]
|
||||
supported = [abi == 'armeabi' and 'arm' or abi.split('-')[0]
|
||||
for abi in self.device.supported_abi]
|
||||
if self.instruction_set not in supported:
|
||||
message = 'Instruction set "{}" is not supported by the device; (supported: {})'
|
||||
raise WorkloadError(message.format(self.instruction_set, supported))
|
||||
|
Loading…
x
Reference in New Issue
Block a user