summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@digia.com>2014-11-05 15:52:34 +0100
committerChristian Stenger <christian.stenger@theqtcompany.com>2014-12-04 13:52:15 +0100
commita2a4fe564a170dd65f509e63e77fdf65a78a5c6b (patch)
treef730169b41fdeb9a92f2b9c398b397f6b452b4cd
parent1145febc05559b47a54717264564e64ba5f8d41c (diff)
downloadqt-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.cpp4
-rw-r--r--plugins/autotest/testrunner.cpp8
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;
}
}