mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +00:00
Android Device: Add force flag to install_apk
A force flag has been added to the `install_apk` method which ignores the check that the specified file is an apk. This is to support the new UiAutomation Apk which have been given the extention .uiautoapk.
This commit is contained in:
parent
e038fb924a
commit
5d8305cfdc
@ -390,10 +390,10 @@ class AndroidDevice(BaseLinuxDevice): # pylint: disable=W0223
|
||||
else:
|
||||
return self.install_executable(filepath, with_name)
|
||||
|
||||
def install_apk(self, filepath, timeout=default_timeout, replace=False, allow_downgrade=False): # pylint: disable=W0221
|
||||
def install_apk(self, filepath, timeout=default_timeout, replace=False, allow_downgrade=False, force=False): # pylint: disable=W0221
|
||||
self._check_ready()
|
||||
ext = os.path.splitext(filepath)[1].lower()
|
||||
if ext == '.apk':
|
||||
if ext == '.apk' or force:
|
||||
flags = []
|
||||
if replace:
|
||||
flags.append('-r') # Replace existing APK
|
||||
|
Loading…
x
Reference in New Issue
Block a user