forked from qt-creator/qt-creator
AutoTest: Fix special handling for boost exit
...especially for the case where the test output is suppressed. Change-Id: I7294af9e941d800b8aae65f7c2c6f898f2ac4e46 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -31,12 +31,6 @@ BoostTestOutputReader::BoostTestOutputReader(Process *testApplication,
|
||||
, m_logLevel(log)
|
||||
, m_reportLevel(report)
|
||||
{
|
||||
if (!testApplication)
|
||||
return;
|
||||
|
||||
connect(testApplication, &Process::done, this, [this, testApplication] {
|
||||
onDone(testApplication->exitCode());
|
||||
});
|
||||
}
|
||||
|
||||
// content of "error:..." / "info:..." / ... messages
|
||||
|
@@ -23,7 +23,7 @@ protected:
|
||||
TestResult createDefaultResult() const override;
|
||||
|
||||
private:
|
||||
void onDone(int exitCode);
|
||||
void onDone(int exitCode) override;
|
||||
void sendCompleteInformation();
|
||||
void handleMessageMatch(const QRegularExpressionMatch &match);
|
||||
void reportNoOutputFinish(const QString &description, ResultType type);
|
||||
|
@@ -28,6 +28,8 @@ public:
|
||||
void setId(const QString &id) { m_id = id; }
|
||||
QString id() const { return m_id; }
|
||||
|
||||
virtual void onDone(int exitCode) { Q_UNUSED(exitCode) }
|
||||
|
||||
void resetCommandlineColor();
|
||||
signals:
|
||||
void newResult(const TestResult &result);
|
||||
|
@@ -419,6 +419,9 @@ void TestRunner::runTestsHelper()
|
||||
+ processInformation(&process) + rcInfo(config));
|
||||
}
|
||||
|
||||
if (testStorage->m_outputReader)
|
||||
testStorage->m_outputReader->onDone(process.exitCode());
|
||||
|
||||
if (process.exitStatus() == QProcess::CrashExit) {
|
||||
if (testStorage->m_outputReader)
|
||||
testStorage->m_outputReader->reportCrash();
|
||||
|
Reference in New Issue
Block a user