1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 20:11:20 +00:00

AndroidWorkload: Uninstall uiauto apks before reinstalling

Due to the fact that uiauto apk files built on different machines will
be signed with different keys, adb will fail to overwrite a previous
version even when set to replace. This commit now will uninstall the
previous uiauto apk file if present before attempting to install the new
version.
This commit is contained in:
Marc Bonnici 2017-06-28 15:36:26 +01:00
parent 27b488cc56
commit 4d397ab465

View File

@ -293,7 +293,9 @@ class UiAutomatorGUI(object):
instrumentation_string)
def deploy(self):
self.target.install_apk(self.uiauto_file, replace=True)
if self.target.package_is_installed(self.uiauto_package):
self.target.uninstall_package(self.uiauto_package)
self.target.install_apk(self.uiauto_file)
def set(self, name, value):
self.uiauto_params[name] = value