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 <christian.kandeler@qt.io>
This commit is contained in:
Andre Hartmann
2020-09-19 09:08:00 +02:00
committed by André Hartmann
parent fd5f0e6819
commit 2921b94785

View File

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