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:
Christian Stenger
2023-06-20 08:58:49 +02:00
parent 32c864951c
commit b6961c38b6
4 changed files with 6 additions and 7 deletions

View File

@@ -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

View File

@@ -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);

View File

@@ -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);

View File

@@ -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();