forked from qt-creator/qt-creator
AutoTest: Clear up and generalize
Instead of transforming forth and back the output try to handle the output once correctly and pass it line-wise around. This also ensures that we always get a single line when appending the output which will be necessary later on. Change-Id: I3e9c6db5f81172997dfe566eee9a86bfe2f17a1f Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -61,7 +61,7 @@ GTestOutputReader::GTestOutputReader(const QFutureInterface<TestResultPtr> &futu
|
||||
}
|
||||
}
|
||||
|
||||
void GTestOutputReader::processOutputLine(const QByteArray &outputLineWithNewLine)
|
||||
void GTestOutputReader::processOutputLine(const QByteArray &outputLine)
|
||||
{
|
||||
static const QRegularExpression newTestStarts("^\\[-{10}\\] \\d+ tests? from (.*)$");
|
||||
static const QRegularExpression testEnds("^\\[-{10}\\] \\d+ tests? from (.*) \\((.*)\\)$");
|
||||
@@ -74,7 +74,7 @@ void GTestOutputReader::processOutputLine(const QByteArray &outputLineWithNewLin
|
||||
static const QRegularExpression iterations("^Repeating all tests "
|
||||
"\\(iteration (\\d+)\\) \\. \\. \\.$");
|
||||
|
||||
const QString line = QString::fromLatin1(chopLineBreak(outputLineWithNewLine));
|
||||
const QString line = QString::fromLatin1(outputLine);
|
||||
if (line.trimmed().isEmpty())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user