1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-21 10:09:02 +00:00

AndroidResource: Updated APKFile to add support for uiautomator tests.

In newer versions of adb, files cannot be installed unless they use the
`.apk` extension therefore we need to be able to distinguish between
regular apks and instrumented test files.
This commit is contained in:
Marc Bonnici 2017-06-05 13:13:46 +01:00
parent 0694ab6792
commit 526ad15c01

@ -35,12 +35,14 @@ class ApkFile(FileResource):
name = 'apk'
def __init__(self, owner, platform=None):
def __init__(self, owner, platform=None, uiauto=False):
super(ApkFile, self).__init__(owner)
self.platform = platform
self.uiauto = uiauto
def __str__(self):
return '<{}\'s {} APK>'.format(self.owner, self.platform)
apk_type = 'uiautomator ' if self.uiauto else ''
return '<{}\'s {} {}APK>'.format(self.owner, self.platform, apk_type)
class uiautoApkFile(FileResource):