summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-08-03 16:09:54 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-08-04 23:26:24 +0000
commitf8dba7ac014e89da55fa5960cb9cd23018fbbc3f (patch)
tree6163e1176461d06c959fd49b3dc569abebff0922 /tests
parentb3da7494ba827055f1cf34d9aa20724a464bc95b (diff)
tst_QSharedPointer: raise the timeout for running qmake and makespec
We had 30s and 60s only, which isn'tenough for the Qt CI. Task-number: QTBUG-69741 Change-Id: I00e04a465fcf4fc1a462fffd154782999e84ef8b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
index 3e1668522e..4dc620e6ab 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
@@ -53,6 +53,12 @@
# include <unistd.h>
#endif
+enum {
+ QMakeTimeout = 300000, // 5 minutes
+ CompileTimeout = 600000, // 10 minutes
+ RunTimeout = 300000 // 5 minutes
+};
+
static QString makespec()
{
static const char default_makespec[] = DEFAULT_MAKESPEC;
@@ -143,7 +149,7 @@ namespace QTest {
bool prepareSourceCode(const QByteArray &body);
bool createProjectFile();
bool runQmake();
- bool runMake(Target target);
+ bool runMake(Target target, int timeout);
bool commonSetup(const QByteArray &body);
};
@@ -602,7 +608,7 @@ namespace QTest {
std_err += "qmake: ";
std_err += qmake.errorString().toLocal8Bit();
} else {
- ok = qmake.waitForFinished();
+ ok = qmake.waitForFinished(QMakeTimeout);
exitCode = qmake.exitCode();
if (!ok)
QTest::ensureStopped(qmake);
@@ -617,7 +623,7 @@ namespace QTest {
#endif // QT_CONFIG(process)
}
- bool QExternalTestPrivate::runMake(Target target)
+ bool QExternalTestPrivate::runMake(Target target, int timeout)
{
#if !QT_CONFIG(process)
return false;
@@ -670,7 +676,7 @@ namespace QTest {
}
make.closeWriteChannel();
- bool ok = make.waitForFinished(channelMode == QProcess::ForwardedChannels ? -1 : 60000);
+ bool ok = make.waitForFinished(channelMode == QProcess::ForwardedChannels ? -1 : timeout);
if (!ok)
QTest::ensureStopped(make);
exitCode = make.exitCode();
@@ -705,7 +711,7 @@ namespace QTest {
failedStage = QExternalTest::CompilationStage;
std_out += "\n### --- stdout from make (compilation) --- ###\n";
std_err += "\n### --- stderr from make (compilation) --- ###\n";
- return runMake(Compile);
+ return runMake(Compile, CompileTimeout);
}
bool QExternalTestPrivate::tryLink(const QByteArray &body)
@@ -717,7 +723,7 @@ namespace QTest {
failedStage = QExternalTest::LinkStage;
std_out += "\n### --- stdout from make (linking) --- ###\n";
std_err += "\n### --- stderr from make (linking) --- ###\n";
- return runMake(Link);
+ return runMake(Link, CompileTimeout);
}
bool QExternalTestPrivate::tryRun(const QByteArray &body)
@@ -729,7 +735,7 @@ namespace QTest {
failedStage = QExternalTest::RunStage;
std_out += "\n### --- stdout from process --- ###\n";
std_err += "\n### --- stderr from process --- ###\n";
- return runMake(Run);
+ return runMake(Run, RunTimeout);
}
}
QT_END_NAMESPACE