summaryrefslogtreecommitdiff
path: root/scripts/Util.py
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2021-01-20 11:07:12 +0100
committerJose <jose@zeroc.com>2021-01-20 11:08:21 +0100
commit46af0c45bfae130fbf508ec5170e14de1798b622 (patch)
tree839a11c4f9f56f0b0a3db79066b20a9ada7fe621 /scripts/Util.py
parentAdded tracing to Ice/faultTolerance test, fixes #1251 (diff)
downloadice-46af0c45bfae130fbf508ec5170e14de1798b622.tar.bz2
ice-46af0c45bfae130fbf508ec5170e14de1798b622.tar.xz
ice-46af0c45bfae130fbf508ec5170e14de1798b622.zip
Uninstall android test controller if it was left behind, before doing a fresh install
Diffstat (limited to 'scripts/Util.py')
-rw-r--r--scripts/Util.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/Util.py b/scripts/Util.py
index 21dd5464ae9..e64b6b98f0a 100644
--- a/scripts/Util.py
+++ b/scripts/Util.py
@@ -2445,6 +2445,11 @@ class AndroidProcessController(RemoteProcessController):
elif current.config.device != "usb":
run("adb connect {}".format(current.config.device))
+ # First try uninstall in case the controller was left behind from a previous run
+ try:
+ run("{} shell pm uninstall com.zeroc.testcontroller".format(self.adb()))
+ except:
+ pass
run("{} install -t -r {}".format(self.adb(), current.testcase.getMapping().getApk(current)))
run("{} shell am start -n \"{}\" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER".format(
self.adb(), current.testcase.getMapping().getActivityName()))