mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 11:22:41 +01:00
utils/types: Add version_tuple
Allow for `version_tuple` to be used more generically to enable natural comparing of versions encoded as strings.
This commit is contained in:
@@ -284,8 +284,8 @@ def apk_version_matches(path, version):
|
||||
|
||||
|
||||
def loose_version_matching(config_version, apk_version):
|
||||
config_version = config_version.split('.')
|
||||
apk_version = apk_version.split('.')
|
||||
config_version = version_tuple(config_version)
|
||||
apk_version = version_tuple(apk_version)
|
||||
|
||||
if len(apk_version) < len(config_version):
|
||||
return False # More specific version requested than available
|
||||
|
@@ -28,7 +28,7 @@ from wa.framework.plugin import TargetedPlugin, Parameter
|
||||
from wa.framework.resource import (ApkFile, ReventFile,
|
||||
File, loose_version_matching)
|
||||
from wa.framework.exception import WorkloadError, ConfigError
|
||||
from wa.utils.types import ParameterDict, list_or_string
|
||||
from wa.utils.types import ParameterDict, list_or_string, version_tuple
|
||||
from wa.utils.revent import ReventRecorder
|
||||
from wa.utils.exec_control import once_per_instance
|
||||
|
||||
|
Reference in New Issue
Block a user