From 2921b94785c2b057b3e75096515939d8624a65b3 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Sat, 19 Sep 2020 09:08:00 +0200 Subject: [PATCH] QtTestParser: Fix switching back to Status::NotHandled Every Application Output occurrence of "FAIL! : test1::test_case1() Hi there!" made the QtTestParser handle all subsequent lines until the platform depending closing pattern " Loc: [../Test/tst_test1.cpp(13)]" (UNIX) or "..\Test\tst_test1.cpp(13) : failure location" (Windows) was found. If that pattern did not follow, or if the wrong platform pattern followed, all subsequent lines were not handled by other output parsers. Fix that by returning NotHandled if the locationPattern does not match one of the next lines after the triggerPattern (only actual/expected lines may appear in between). Fixes: QTCREATORBUG-24353 Change-Id: If28af6738d6b01751c0c916d1a5d8a31dcea9ff4 Reviewed-by: Christian Kandeler --- src/plugins/qtsupport/qttestparser.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/qtsupport/qttestparser.cpp b/src/plugins/qtsupport/qttestparser.cpp index ec9bde4dd19..827cdffa47f 100644 --- a/src/plugins/qtsupport/qttestparser.cpp +++ b/src/plugins/qtsupport/qttestparser.cpp @@ -78,8 +78,11 @@ OutputLineParser::Result QtTestParser::handleLine(const QString &line, OutputFor emitCurrentTask(); return {Status::Done, linkSpecs}; } - m_currentTask.details.append(theLine); - return Status::InProgress; + if (line.startsWith(" Actual") || line.startsWith(" Expected")) { + m_currentTask.details.append(theLine); + return Status::InProgress; + } + return Status::NotHandled; } void QtTestParser::emitCurrentTask()