diff options
author | Marc Bonnici <marc.bonnici@arm.com> | 2019-01-04 16:24:08 +0000 |
---|---|---|
committer | setrofim <setrofim@gmail.com> | 2019-02-08 13:56:55 +0000 |
commit | f267fc927748b07fbf8ad619013bb652fb6ff935 (patch) | |
tree | 59a7982ea0f91fb493cfc185100e3adbe97071c2 | |
parent | 462a5b651a9360fcde34b26df51ded98699c1f38 (diff) |
fw/workload: Use apk version for workload if not set.
If a workloads `version` attribute is not set, and an APK file is
found, use this as the version number. This allows for workloads to not
specify a default version via parameters and for an available APK to be
automatically chosen.
-rw-r--r-- | wa/framework/workload.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wa/framework/workload.py b/wa/framework/workload.py index 62f980ce..8d57aeb3 100644 --- a/wa/framework/workload.py +++ b/wa/framework/workload.py @@ -271,6 +271,9 @@ class ApkWorkload(Workload): def initialize(self, context): super(ApkWorkload, self).initialize(context) self.apk.initialize(context) + # pylint: disable=access-member-before-definition, attribute-defined-outside-init + if self.version is None: + self.version = self.apk.apk_info.version_name if self.view is None: self.view = 'SurfaceView - {}/{}'.format(self.apk.package, self.apk.activity) |