AutoTest: Fix handling of data tags in test results

Avoid adding test functions again and put further data tags
directly below the respective test function.

Change-Id: I29775b836cc4584358ee67b5f07744986c6a6591
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2017-01-19 12:15:59 +01:00
parent e2b909c6b6
commit ae2c068e68
6 changed files with 15 additions and 3 deletions

View File

@@ -169,6 +169,8 @@ void QtTestOutputReader::processOutput(const QByteArray &outputLine)
} else if (currentTag == QStringLiteral("TestFunction")) {
m_testCase = m_xmlReader.attributes().value(QStringLiteral("name")).toString();
QTC_ASSERT(!m_testCase.isEmpty(), continue);
if (m_testCase == m_formerTestCase) // don't report "Executing..." more than once
continue;
TestResultPtr testResult = TestResultPtr(createDefaultResult());
testResult->setResult(Result::MessageTestCaseStart);
testResult->setDescription(tr("Executing test function %1").arg(m_testCase));
@@ -261,6 +263,7 @@ void QtTestOutputReader::processOutput(const QByteArray &outputLine)
m_futureInterface.reportResult(TestResultPtr(testResult));
m_futureInterface.setProgressValue(m_futureInterface.progressValue() + 1);
m_dataTag.clear();
m_formerTestCase = m_testCase;
m_testCase.clear();
} else if (currentTag == QStringLiteral("TestCase")) {
QtTestResult *testResult = createDefaultResult();