mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
Renamed 'check_abi' parameter to 'exact_abi'
This commit is contained in:
parent
a8a8d21de6
commit
0dfbbae7b6
@ -13,10 +13,10 @@ to chnage the location of this folder. The APK files need to be put into the cor
|
|||||||
for the workload they belong to. The name of the file can be anything but as explained below may need
|
for the workload they belong to. The name of the file can be anything but as explained below may need
|
||||||
to contain certain peices of information.
|
to contain certain peices of information.
|
||||||
|
|
||||||
All ApkWorkloads have parameters that affect the way in which APK files are resolved, ``check_abi``,
|
All ApkWorkloads have parameters that affect the way in which APK files are resolved, ``exact_abi``,
|
||||||
``force_install`` and ``check_apk``. Their exact behaviours are outlined below.
|
``force_install`` and ``check_apk``. Their exact behaviours are outlined below.
|
||||||
|
|
||||||
.. confval:: check_abi
|
.. confval:: exact_abi
|
||||||
|
|
||||||
If this setting is enabled WA's resource resolvers will look for the devices ABI with any native
|
If this setting is enabled WA's resource resolvers will look for the devices ABI with any native
|
||||||
code present in the apk. By default this setting is disabled since most apks will work across all
|
code present in the apk. By default this setting is disabled since most apks will work across all
|
||||||
|
@ -186,7 +186,7 @@ class ApkWorkload(Workload):
|
|||||||
'''),
|
'''),
|
||||||
Parameter('uninstall_apk', kind=boolean, default=False,
|
Parameter('uninstall_apk', kind=boolean, default=False,
|
||||||
description='If ``True``, will uninstall workload\'s APK as part of teardown.'),
|
description='If ``True``, will uninstall workload\'s APK as part of teardown.'),
|
||||||
Parameter('check_abi', kind=bool, default=False,
|
Parameter('exact_abi', kind=bool, default=False,
|
||||||
description='''
|
description='''
|
||||||
If ``True``, workload will check that the APK matches the target
|
If ``True``, workload will check that the APK matches the target
|
||||||
device ABI, otherwise any APK found will be used.
|
device ABI, otherwise any APK found will be used.
|
||||||
@ -200,7 +200,7 @@ class ApkWorkload(Workload):
|
|||||||
self.apk_version = None
|
self.apk_version = None
|
||||||
self.logcat_log = None
|
self.logcat_log = None
|
||||||
self.exact_apk_version = None
|
self.exact_apk_version = None
|
||||||
self.check_abi = kwargs.get('check_abi')
|
self.exact_abi = kwargs.get('exact_abi')
|
||||||
|
|
||||||
def setup(self, context): # pylint: disable=too-many-branches
|
def setup(self, context): # pylint: disable=too-many-branches
|
||||||
Workload.setup(self, context)
|
Workload.setup(self, context)
|
||||||
@ -229,8 +229,8 @@ class ApkWorkload(Workload):
|
|||||||
variant_name=getattr(self, 'variant_name', None),
|
variant_name=getattr(self, 'variant_name', None),
|
||||||
strict=False)
|
strict=False)
|
||||||
|
|
||||||
# Stop if apk found, or if check_abi is set only look for primary abi.
|
# Stop if apk found, or if exact_abi is set only look for primary abi.
|
||||||
if self.apk_file or self.check_abi:
|
if self.apk_file or self.exact_abi:
|
||||||
break
|
break
|
||||||
|
|
||||||
host_version = None
|
host_version = None
|
||||||
@ -250,8 +250,8 @@ class ApkWorkload(Workload):
|
|||||||
msg = "APK version '{}' not found on the host '{}' or target '{}'"
|
msg = "APK version '{}' not found on the host '{}' or target '{}'"
|
||||||
raise ResourceError(msg.format(self.exact_apk_version, host_version, target_version))
|
raise ResourceError(msg.format(self.exact_apk_version, host_version, target_version))
|
||||||
|
|
||||||
# Error if check_abi and suitable apk not found on host and incorrect version on device
|
# Error if exact_abi and suitable apk not found on host and incorrect version on device
|
||||||
if self.check_abi and host_version is None:
|
if self.exact_abi and host_version is None:
|
||||||
if target_abi != self.device.abi:
|
if target_abi != self.device.abi:
|
||||||
msg = "APK abi '{}' not found on the host and target is '{}'"
|
msg = "APK abi '{}' not found on the host and target is '{}'"
|
||||||
raise ResourceError(msg.format(self.device.abi, target_abi))
|
raise ResourceError(msg.format(self.device.abi, target_abi))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user