mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-21 18:18:41 +00:00
fw/resource: Support matching APKs on multiple versions.
In the case where a range of apk versions are valid allow for the matching process to accommodate a list of versions instead of a single value.
This commit is contained in:
parent
f267fc9277
commit
0cba3c68dc
@ -273,10 +273,14 @@ class ResourceResolver(object):
|
|||||||
|
|
||||||
|
|
||||||
def apk_version_matches(path, version):
|
def apk_version_matches(path, version):
|
||||||
|
version = list_or_string(version)
|
||||||
info = ApkInfo(path)
|
info = ApkInfo(path)
|
||||||
if info.version_name == version or info.version_code == version:
|
for v in version:
|
||||||
return True
|
if info.version_name == v or info.version_code == v:
|
||||||
return loose_version_matching(version, info.version_name)
|
return True
|
||||||
|
if loose_version_matching(v, info.version_name):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def loose_version_matching(config_version, apk_version):
|
def loose_version_matching(config_version, apk_version):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user