1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-25 22:52:40 +01:00

resource_getters: Add support for matching apks via package name

Allows distinguishing between apks based on the package name specified
in the workload.
This commit is contained in:
Marc Bonnici
2018-01-23 11:20:53 +00:00
committed by setrofim
parent e5417e5b7f
commit 7c920f953c
3 changed files with 7 additions and 3 deletions

View File

@@ -565,6 +565,7 @@ def get_from_list_by_extension(resource, filelist, extension, version=None, vari
filelist = [ff for ff in filelist if version.lower() in os.path.basename(ff).lower()]
if extension == 'apk':
filelist = [ff for ff in filelist if not ApkInfo(ff).native_code or resource.platform in ApkInfo(ff).native_code]
filelist = [ff for ff in filelist if not resource.package or resource.package == ApkInfo(ff).package]
filelist = [ff for ff in filelist if resource.uiauto == ('com.arm.wlauto.uiauto' in ApkInfo(ff).package)]
if len(filelist) == 1:
return filelist[0]