summaryrefslogtreecommitdiff
path: root/scripts/Util.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2019-12-03 15:32:20 +0100
committerBenoit Foucher <benoit@zeroc.com>2019-12-03 15:32:20 +0100
commit85e196a6f2ea9853ccde63c0da25f145c9e3f2c0 (patch)
treef5fca9c5ecd9a61f4e592984d3953222bb0aaf94 /scripts/Util.py
parentAnother attempt to fix the iOS simulator hang when starting the test controller (diff)
downloadice-85e196a6f2ea9853ccde63c0da25f145c9e3f2c0.tar.bz2
ice-85e196a6f2ea9853ccde63c0da25f145c9e3f2c0.tar.xz
ice-85e196a6f2ea9853ccde63c0da25f145c9e3f2c0.zip
Another iOS simuator fix to workaround issues with start the C++ controllers
Diffstat (limited to 'scripts/Util.py')
-rw-r--r--scripts/Util.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/Util.py b/scripts/Util.py
index d1dca62be83..77d42a659d8 100644
--- a/scripts/Util.py
+++ b/scripts/Util.py
@@ -2248,7 +2248,7 @@ class RemoteProcessController(ProcessController):
pass
nRetry = 0
- while nRetry < 10:
+ while nRetry < 24:
nRetry += 1
if self.supportsDiscovery():
@@ -2262,7 +2262,7 @@ class RemoteProcessController(ProcessController):
# If the controller isn't up after 30s, we restart it. With the iOS simulator,
# it's not uncommon to get Springoard crashes when starting the controller.
- if nRetry == 10:
+ if nRetry == 18:
sys.stdout.write("controller application unreachable, restarting... ")
sys.stdout.flush()
self.restartControllerApp(current, ident)
@@ -2552,7 +2552,14 @@ class iOSSimulatorProcessController(RemoteProcessController):
# with simctl terminate doesn't always work, it can hang if the controller app died because
# of the springboard watchdog.
run("xcrun simctl shutdown \"{0}\"".format(self.device))
- run("xcrun simctl boot \"{0}\"".format(self.device))
+ nRetry = 0
+ while nRetry < 20:
+ try:
+ run("xcrun simctl boot \"{0}\"".format(self.device))
+ break
+ except Exception:
+ time.sleep(1.0)
+ nRetry += 1
run("xcrun simctl launch \"{0}\" {1}".format(self.device, ident.name))
def stopControllerApp(self, ident):