mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-21 01:59:13 +00:00
ApkWorkload: add check for an exact APK version
Checks for an APK version on the host or target which matches a specified value
This commit is contained in:
parent
8b1d2c9fe9
commit
ba34b973ac
@ -199,6 +199,7 @@ class ApkWorkload(Workload):
|
||||
self.apk_file = None
|
||||
self.apk_version = None
|
||||
self.logcat_log = None
|
||||
self.exact_apk_version = None
|
||||
|
||||
def setup(self, context):
|
||||
Workload.setup(self, context)
|
||||
@ -227,6 +228,11 @@ class ApkWorkload(Workload):
|
||||
msg = "Could not find APK for '{}' on the host or target device"
|
||||
raise ResourceError(msg.format(self.name))
|
||||
|
||||
if self.exact_apk_version is not None:
|
||||
if self.exact_apk_version != target_version and self.version != host_version:
|
||||
msg = "APK version '{}' not found on the host '{}' or target '{}'"
|
||||
raise ResourceError(msg.format(self.version, host_version, target_version))
|
||||
|
||||
# Ensure the apk is setup on the device
|
||||
if self.force_install:
|
||||
self.force_install_apk(context, host_version)
|
||||
|
Loading…
x
Reference in New Issue
Block a user