1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-10-30 14:44:09 +00:00

Check APK version and ABI when installing

- Check the APK's versionName property against the workload's
  expected version if specified
- If workload specifies check_abi param, try to get APK from
  ABI-specific path on the host
- Add variant_name param to APK resource-getter for backwards
  compatibility of dex2oat and peacekeeper
This commit is contained in:
muendelezaji
2016-06-22 19:34:04 +01:00
parent fab6a977aa
commit bb33123b17
6 changed files with 76 additions and 18 deletions

View File

@@ -53,7 +53,8 @@ class Dex2oatBenchmark(Workload):
def init_resources(self, context):
# TODO: find a better APK to use for this.
peacekeeper = ExtensionLoader().get_workload('peacekeeper', self.device)
self.apk_file = context.resolver.get(wlauto.common.android.resources.ApkFile(peacekeeper), version='chrome')
self.apk_file = context.resolver.get(wlauto.common.android.resources.ApkFile(peacekeeper),
variant_name='chrome')
self.package = ApkInfo(self.apk_file).package
def setup(self, context):
@@ -119,4 +120,3 @@ class Dex2oatBenchmark(Workload):
def teardown(self, context):
self.device.delete_file(self.on_device_oat)

View File

@@ -63,7 +63,7 @@ class Peacekeeper(AndroidUiAutoBenchmark):
def __init__(self, device, **kwargs):
super(Peacekeeper, self).__init__(device, **kwargs)
self.version = self.browser
self.variant_name = self.browser
def update_result(self, context):
super(Peacekeeper, self).update_result(context)