Cancel process when timeout is reached...

...and display fatal messages on the summary as well.
This commit is contained in:
Christian Stenger
2014-11-05 15:52:34 +01:00
committed by Christian Stenger
parent 1145febc05
commit a2a4fe564a
2 changed files with 12 additions and 0 deletions

View File

@@ -288,6 +288,14 @@ bool performExec(const QString &cmd, const QStringList &args, const QString &wor
if (ok && executionTimer.elapsed() < timeout) {
return m_runner->exitCode() == 0;
} else {
if (m_runner->state() != QProcess::NotRunning) {
m_runner->kill();
m_runner->waitForFinished();
TestResultsPane::instance()->addTestResult(
TestResult(QString(), QString(), QString(), ResultType::MESSAGE_FATAL,
QObject::tr("*** Test Case canceled due to timeout ***\n"
"Maybe raise the timeout?")));
}
return false;
}
}