diff options
author | Christian Stenger <christian.stenger@digia.com> | 2014-11-05 15:52:34 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@theqtcompany.com> | 2014-12-04 13:52:15 +0100 |
commit | a2a4fe564a170dd65f509e63e77fdf65a78a5c6b (patch) | |
tree | f730169b41fdeb9a92f2b9c398b397f6b452b4cd | |
parent | 1145febc05559b47a54717264564e64ba5f8d41c (diff) | |
download | qt-creator-a2a4fe564a170dd65f509e63e77fdf65a78a5c6b.tar.gz |
Cancel process when timeout is reached...
...and display fatal messages on the summary as well.
-rw-r--r-- | plugins/autotest/testresultspane.cpp | 4 | ||||
-rw-r--r-- | plugins/autotest/testrunner.cpp | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/plugins/autotest/testresultspane.cpp b/plugins/autotest/testresultspane.cpp index e903aecffd..d14b7567ca 100644 --- a/plugins/autotest/testresultspane.cpp +++ b/plugins/autotest/testresultspane.cpp @@ -309,6 +309,10 @@ void TestResultsPane::updateSummaryLabel() if (count) labelText.append(QString::fromLatin1(", %1 %2") .arg(QString::number(count), tr("expected fails"))); + count = m_model->resultTypeCount(ResultType::MESSAGE_FATAL); + if (count) + labelText.append(QString::fromLatin1(", %1 %2") + .arg(QString::number(count), tr("fatals"))); labelText.append(QLatin1String(".</p>")); m_summaryLabel->setText(labelText); } diff --git a/plugins/autotest/testrunner.cpp b/plugins/autotest/testrunner.cpp index 4591f94081..fb4028edf0 100644 --- a/plugins/autotest/testrunner.cpp +++ b/plugins/autotest/testrunner.cpp @@ -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; } } |