Commit 9d5ff465 authored by Daniel Teske's avatar Daniel Teske

Android: Increase timeout for adb to 10s

On some machines adb takes a longer than 5s to finish. The reasons for
that are unknown.

Change-Id: I949dc40b8f407aa98be0456df47a9ebe88e230a5
Reviewed-by: default avatarEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
parent 5d7963d9
......@@ -460,7 +460,7 @@ QVector<AndroidDeviceInfo> AndroidConfig::connectedDevices(QString *error) const
QVector<AndroidDeviceInfo> devices;
QProcess adbProc;
adbProc.start(adbToolPath().toString(), QStringList() << QLatin1String("devices"));
if (!adbProc.waitForFinished(5000)) {
if (!adbProc.waitForFinished(10000)) {
adbProc.kill();
if (error)
*error = QApplication::translate("AndroidConfiguration",
......@@ -729,7 +729,7 @@ bool AndroidConfig::isBootToQt(const QString &device) const
QProcess adbProc;
adbProc.start(adbToolPath().toString(), arguments);
if (!adbProc.waitForFinished(5000)) {
if (!adbProc.waitForFinished(10000)) {
adbProc.kill();
return false;
}
......@@ -745,7 +745,7 @@ int AndroidConfig::getSDKVersion(const QString &device) const
QProcess adbProc;
adbProc.start(adbToolPath().toString(), arguments);
if (!adbProc.waitForFinished(5000)) {
if (!adbProc.waitForFinished(10000)) {
adbProc.kill();
return -1;
}
......@@ -768,7 +768,7 @@ QString AndroidConfig::getProductModel(const QString &device) const
QProcess adbProc;
adbProc.start(adbToolPath().toString(), arguments);
if (!adbProc.waitForFinished(5000)) {
if (!adbProc.waitForFinished(10000)) {
adbProc.kill();
return device;
}
......@@ -788,7 +788,7 @@ bool AndroidConfig::hasFinishedBooting(const QString &device) const
QProcess adbProc;
adbProc.start(adbToolPath().toString(), arguments);
if (!adbProc.waitForFinished(5000)) {
if (!adbProc.waitForFinished(10000)) {
adbProc.kill();
return false;
}
......@@ -811,7 +811,7 @@ QStringList AndroidConfig::getAbis(const QString &device) const
QProcess adbProc;
adbProc.start(adbToolPath().toString(), arguments);
if (!adbProc.waitForFinished(5000)) {
if (!adbProc.waitForFinished(10000)) {
adbProc.kill();
return result;
}
......
......@@ -281,7 +281,7 @@ unsigned int AndroidDeployStep::remoteModificationTime(const QString &fullDestin
QStringList arguments = AndroidDeviceInfo::adbSelector(m_deviceSerialNumber);
arguments << QLatin1String("ls") << destination;
process.start(AndroidConfigurations::currentConfig().adbToolPath().toString(), arguments);
if (!process.waitForFinished(5000)
if (!process.waitForFinished(10000)
|| process.exitCode() != 0)
return 0;
QByteArray output = process.readAll();
......
......@@ -240,7 +240,7 @@ void AndroidRunner::asyncStart()
emit remoteProcessFinished(tr("Failed to forward C++ debugging ports. Reason: %1.").arg(adb.errorString()));
return;
}
if (!adb.waitForFinished(5000)) {
if (!adb.waitForFinished(10000)) {
emit remoteProcessFinished(tr("Failed to forward C++ debugging ports."));
return;
}
......@@ -283,7 +283,7 @@ void AndroidRunner::asyncStart()
emit remoteProcessFinished(tr("Failed to start the activity. Reason: %1.").arg(adb.errorString()));
return;
}
if (!adb.waitForFinished(5000)) {
if (!adb.waitForFinished(10000)) {
adb.terminate();
emit remoteProcessFinished(tr("Unable to start \"%1\".").arg(m_packageName));
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment