diff options
author | Christian Stenger <christian.stenger@qt.io> | 2021-05-20 09:14:05 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2021-05-21 06:04:17 +0000 |
commit | ad167901403dd0ff9c8b4792e0be915f55da2bf3 (patch) | |
tree | 9ffafe089504150b8cdfa671e5a46dc68eeec0a9 | |
parent | e7f923e9f1031996e14cd5f71fe98d70d5f5ecc2 (diff) | |
download | qt-creator-ad167901403dd0ff9c8b4792e0be915f55da2bf3.tar.gz |
AutoTest: Do not ignore crashing tests
If a test crashes we need to take its output into account
to avoid not displaying a result for the respective test
and having a wrong visual view of the results.
Change-Id: I349153192fa06c5d61bc51f8274d32ceb8cf8731
Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r-- | src/plugins/autotest/ctest/ctestoutputreader.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/autotest/ctest/ctestoutputreader.cpp b/src/plugins/autotest/ctest/ctestoutputreader.cpp index 0784a88b4e..cc8a8a1bbd 100644 --- a/src/plugins/autotest/ctest/ctestoutputreader.cpp +++ b/src/plugins/autotest/ctest/ctestoutputreader.cpp @@ -81,7 +81,8 @@ void CTestOutputReader::processOutputLine(const QByteArray &outputLine) static const QRegularExpression testProject("^Test project (.*)$"); static const QRegularExpression testCase("^(test \\d+)|( Start\\s+\\d+: .*)$"); static const QRegularExpression testResult("^\\s*\\d+/\\d+ Test\\s+#\\d+: (.*) (\\.+)\\s*" - "(Passed|\\*\\*\\*Failed)\\s+(.*) sec$"); + "(Passed|\\*\\*\\*Failed|" + ".*\\*\\*\\*Exception:.*)\\s+(.*) sec$"); static const QRegularExpression summary("^\\d+% tests passed, (\\d+) tests failed " "out of (\\d+)"); static const QRegularExpression summaryTime("^Total Test time .* =\\s+(.*) sec$"); @@ -110,7 +111,13 @@ void CTestOutputReader::processOutputLine(const QByteArray &outputLine) } else if (ExactMatch match = testResult.match(line)) { m_description = match.captured(); m_testName = match.captured(1); - m_result = (match.captured(3) == "Passed") ? ResultType::Pass : ResultType::Fail; + const QString resultType = match.captured(3); + if (resultType == "Passed") + m_result = ResultType::Pass; + else if (resultType == "***Failed") + m_result = ResultType::Fail; + else + m_result = ResultType::MessageFatal; } else if (ExactMatch match = summary.match(line)) { if (!m_testName.isEmpty()) sendCompleteInformation(); |