forked from qt-creator/qt-creator
Cancel process when timeout is reached...
...and display fatal messages on the summary as well.
This commit is contained in:
committed by
Christian Stenger
parent
1145febc05
commit
a2a4fe564a
@@ -309,6 +309,10 @@ void TestResultsPane::updateSummaryLabel()
|
|||||||
if (count)
|
if (count)
|
||||||
labelText.append(QString::fromLatin1(", %1 %2")
|
labelText.append(QString::fromLatin1(", %1 %2")
|
||||||
.arg(QString::number(count), tr("expected fails")));
|
.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>"));
|
labelText.append(QLatin1String(".</p>"));
|
||||||
m_summaryLabel->setText(labelText);
|
m_summaryLabel->setText(labelText);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,6 +288,14 @@ bool performExec(const QString &cmd, const QStringList &args, const QString &wor
|
|||||||
if (ok && executionTimer.elapsed() < timeout) {
|
if (ok && executionTimer.elapsed() < timeout) {
|
||||||
return m_runner->exitCode() == 0;
|
return m_runner->exitCode() == 0;
|
||||||
} else {
|
} 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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user