AutoTest: Support messages from death tests

Do not omit messages from death tests as they can be
essential to figure out what went wrong.

Fixes: QTCREATORBUG-25888
Change-Id: I30bc9856ae952dc30f4002a5bbc98245a524fae7
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2021-06-21 09:36:15 +02:00
parent ad4803ccc8
commit cb2febdaae

View File

@@ -64,6 +64,7 @@ void GTestOutputReader::processOutputLine(const QByteArray &outputLine)
static const QRegularExpression newTestSetStarts("^\\[ RUN \\] (.*)$");
static const QRegularExpression testSetSuccess("^\\[ OK \\] (.*) \\((.*)\\)$");
static const QRegularExpression testSetFail("^\\[ FAILED \\] (.*) \\((\\d+ ms)\\)$");
static const QRegularExpression testDeath("^\\[ DEATH \\] (.*)$");
static const QRegularExpression testSetSkipped("^\\[ SKIPPED \\] (.*) \\((\\d+ ms)\\)$");
static const QRegularExpression disabledTests("^ YOU HAVE (\\d+) DISABLED TESTS?$");
static const QRegularExpression iterations("^Repeating all tests "
@@ -182,6 +183,9 @@ void GTestOutputReader::processOutputLine(const QByteArray &outputLine)
testResult->setFileName(file);
testResult->setDescription(match.captured(4));
reportResult(testResult);
} else if (ExactMatch match = testDeath.match(line)) {
m_description.append(line);
m_description.append('\n');
}
}