summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2016-12-08 14:40:10 +0100
committerEike Ziller <eike.ziller@qt.io>2016-12-08 15:29:11 +0000
commit5f054990d694e82a9876df073c712ddceedbd6d6 (patch)
treee0d22f1278e569d584daf3ef0db77bf1a6a0ed5a
parentc226d311b7401f272036952a83901493478ac88f (diff)
downloadqt-creator-5f054990d694e82a9876df073c712ddceedbd6d6.tar.gz
iOSSimulator: Try to avoid flakiness of starting in simulator
Put in some delays between executing the various simulator commands, so whatever might need to startup internally has time to do so. Task-number: QTCREATORBUG-17336 Change-Id: I1d4fbbc14c8583fce1b72ee31d5fd4824f377efb Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r--src/plugins/ios/simulatorcontrol.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/ios/simulatorcontrol.cpp b/src/plugins/ios/simulatorcontrol.cpp
index 4af05f00e3..e3436d9fb0 100644
--- a/src/plugins/ios/simulatorcontrol.cpp
+++ b/src/plugins/ios/simulatorcontrol.cpp
@@ -362,6 +362,7 @@ void SimulatorControlPrivate::startSimulator(QFutureInterface<SimulatorControl::
}
if (!fi.isCanceled()) {
+ QThread::msleep(500); // give it some time. TODO: find an actual fix.
fi.reportResult(response);
}
}
@@ -376,6 +377,7 @@ void SimulatorControlPrivate::installApp(QFutureInterface<SimulatorControl::Resp
response.commandOutput = output;
if (!fi.isCanceled()) {
+ QThread::msleep(500); // give it some time. TODO: find an actual fix.
fi.reportResult(response);
}
}
@@ -455,6 +457,7 @@ void SimulatorControlPrivate::spawnAppProcess(QFutureInterface<SimulatorControl:
}
if (!fi.isCanceled()) {
+ QThread::msleep(500); // give it some time. TODO: find an actual fix.
fi.reportResult(response);
}
}
@@ -474,6 +477,7 @@ void SimulatorControlPrivate::launchApp(QFutureInterface<SimulatorControl::Respo
return;
if (processSpawned) {
+ QThread::msleep(500); // give it some time. TODO: find an actual fix.
const QStringList args({QStringLiteral("launch"), simUdid , bundleIdentifier});
response.commandOutput = runSimCtlCommand(args);
const QByteArray pIdStr = response.commandOutput.trimmed().split(' ').last().trimmed();