AutoTest: Fix handling of critical messages

Fixes handling of qCritical() messages or similar and
silences a soft assert.

Change-Id: I74f485ffd75b65170c2c9752bd774401c0f19734
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2023-11-16 15:18:55 +01:00
parent d05d6f2469
commit f06b821f58
3 changed files with 5 additions and 2 deletions

View File

@@ -333,7 +333,7 @@ void QtTestOutputReader::processPlainTextOutput(const QByteArray &outputLine)
static const QRegularExpression result("^(PASS |FAIL! |XFAIL |XPASS |SKIP |RESULT "
"|BPASS |BFAIL |BXPASS |BXFAIL "
"|INFO |QWARN |WARNING|QDEBUG |QSYSTEM): (.*)$");
"|INFO |QWARN |WARNING|QDEBUG |QSYSTEM|QCRITICAL): (.*)$");
static const QRegularExpression benchDetails("^\\s+([\\d,.]+ .* per iteration "
"\\(total: [\\d,.]+, iterations: \\d+\\))$");

View File

@@ -61,7 +61,9 @@ ResultType TestResult::resultFromString(const QString &resultString)
return ResultType::MessageWarn;
if (resultString == "qfatal")
return ResultType::MessageFatal;
if ((resultString == "system") || (resultString == "qsystem"))
if (resultString == "error" || resultString == "qcritical")
return ResultType::MessageError;
if (resultString == "system" || resultString == "qsystem")
return ResultType::MessageSystem;
if (resultString == "bpass")
return ResultType::BlacklistedPass;

View File

@@ -140,6 +140,7 @@ void TestResultItem::updateResult(bool &changed, ResultType addedChildType,
break;
case ResultType::ExpectedFail:
case ResultType::MessageWarn:
case ResultType::MessageError:
case ResultType::MessageSystem:
case ResultType::Skip:
case ResultType::BlacklistedFail: