1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-07-07 23:54:15 +01:00

Merge pull request from setrofim/master

ApkWorkload: add package verison to the result as a classifer.
This commit is contained in:
Sebastian Goscik
2016-04-14 11:35:49 +01:00
3 changed files with 11 additions and 1 deletions
wlauto
common
core
instrumentation

@ -201,6 +201,7 @@ class ApkWorkload(Workload):
self.logger.debug(message.format(installed_version)) self.logger.debug(message.format(installed_version))
self.reset(context) self.reset(context)
self.apk_version = installed_version self.apk_version = installed_version
context.add_classifiers(apk_version=self.apk_version)
def initialize_with_host_apk(self, context, installed_version): def initialize_with_host_apk(self, context, installed_version):
host_version = ApkInfo(self.apk_file).version_name host_version = ApkInfo(self.apk_file).version_name

@ -204,6 +204,9 @@ class ExecutionContext(object):
def add_metric(self, *args, **kwargs): def add_metric(self, *args, **kwargs):
self.result.add_metric(*args, **kwargs) self.result.add_metric(*args, **kwargs)
def add_classifiers(self, **kwargs):
self.result.classifiers.update(kwargs)
def add_artifact(self, name, path, kind, *args, **kwargs): def add_artifact(self, name, path, kind, *args, **kwargs):
if self.current_job is None: if self.current_job is None:
self.add_run_artifact(name, path, kind, *args, **kwargs) self.add_run_artifact(name, path, kind, *args, **kwargs)

@ -231,7 +231,13 @@ class ApkVersion(Instrument):
name = 'apk_version' name = 'apk_version'
description = """ description = """
Extracts APK versions for workloads that have them. (DEPRECATED) Extracts APK versions for workloads that have them.
This instrument is deprecated and should not be used. It will be removed in
future versions of Workload Automation.
Versions of Android packages are now automatically attached to the results as
"apk_version" classfiers.
""" """