Fix missing MessageTestCaseEnd for Qt4 based tests

Qt4 based tests have no duration, so this message had been omitted
accidently.

Change-Id: I11b03234c8f7fd022e951728b70ae186091c15d9
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
Christian Stenger
2015-12-14 07:23:18 +01:00
parent b13373e45e
commit 2f1018ab24

View File

@@ -282,10 +282,12 @@ void TestOutputReader::processOutput()
testResultCreated(testResult); testResultCreated(testResult);
} }
emit increaseProgress(); emit increaseProgress();
} else if (currentTag == QStringLiteral("TestCase") && !duration.isEmpty()) { } else if (currentTag == QStringLiteral("TestCase")) {
auto testResult = new TestResult(className); auto testResult = new TestResult(className);
testResult->setResult(Result::MessageTestCaseEnd); testResult->setResult(Result::MessageTestCaseEnd);
testResult->setDescription(tr("Test execution took %1 ms.").arg(duration)); testResult->setDescription(
duration.isEmpty() ? tr("Test finished.")
: tr("Test execution took %1 ms.").arg(duration));
testResultCreated(testResult); testResultCreated(testResult);
} else if (validEndTags.contains(currentTag.toString())) { } else if (validEndTags.contains(currentTag.toString())) {
auto testResult = new TestResult(className); auto testResult = new TestResult(className);