AutoTest: Set gtest-result line number even if file can't be resolved

Task-number: QTCREATORBUG-18725
Change-Id: Id9c4749feafcd3dc3c54fcb25589f45e9cebe283
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Claus Steuer
2018-04-05 13:44:31 +02:00
parent 5e483d04bc
commit 27190cd50a

View File

@@ -151,12 +151,13 @@ void GTestOutputReader::processOutput(const QByteArray &outputLine)
match = &errorLocation; match = &errorLocation;
if (match) { if (match) {
testResult->setLine(match->cap(2).toInt());
QString file = constructSourceFilePath(m_buildDir, match->cap(1)); QString file = constructSourceFilePath(m_buildDir, match->cap(1));
if (!file.isEmpty()) { if (!file.isEmpty())
testResult->setFileName(file); testResult->setFileName(file);
testResult->setLine(match->cap(2).toInt());
break; break;
}
} }
} }
reportResult(testResult); reportResult(testResult);