AutoTest: Improve matching test results to tree item

...when using Boost UTF. We need to take parameterized and
templated tests into account differently and we may have
results that do not provide file information at all, so try
to find a matching tree item from what we have got.

Change-Id: Ia0b1894d5dd729d39e5724d9fdeadd574a9cfde5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2020-09-21 17:12:20 +02:00
parent 0d6e2454d6
commit dba75f3d2c
3 changed files with 27 additions and 13 deletions

View File

@@ -240,7 +240,7 @@ QList<TestConfiguration *> BoostTestTreeItem::getTestConfigurations(
if (item->state().testFlag(BoostTestTreeItem::Templated))
tcName.append("<*");
else if (item->state().testFlag(BoostTestTreeItem::Parameterized))
tcName.append('*');
tcName.append("_*");
tcName = handleSpecialFunctionNames(tcName);
testCasesForProjectFile[item->proFile()].testCases.append(
item->prependWithParentsSuitePaths(tcName));
@@ -293,7 +293,7 @@ TestConfiguration *BoostTestTreeItem::testConfiguration() const
if (boostItem->type() == TestSuite) // execute everything below a suite
tcName.append("/*");
else if (boostItem->state().testFlag(BoostTestTreeItem::Parameterized))
tcName.append('*');
tcName.append("_*");
else if (boostItem->state().testFlag(BoostTestTreeItem::Templated))
tcName.append("<*");
testCases.append(boostItem->prependWithParentsSuitePaths(tcName));
@@ -305,7 +305,7 @@ TestConfiguration *BoostTestTreeItem::testConfiguration() const
if (state().testFlag(BoostTestTreeItem::Templated))
tcName.append("<*");
else if (state().testFlag(BoostTestTreeItem::Parameterized))
tcName.append('*');
tcName.append("_*");
testCases.append(prependWithParentsSuitePaths(handleSpecialFunctionNames(tcName)));
}