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>
This commit is contained in:
Eike Ziller
2016-12-08 14:40:10 +01:00
parent c226d311b7
commit 5f054990d6

View File

@@ -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();