AutoTest: Fix handling of summary

Avoid overwriting already gathered results and handle
special cases like parameterized boost tests correctly.
Beside this take into account that fatals on the boost
side are treated as failures when printing the summary.
Amends 6ab7013579.

Change-Id: I3815f79cbb4d16fd7b3d286617d79b30e94ccdd8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Stenger
2020-09-23 09:17:39 +02:00
parent 5cb74af166
commit 479f6c8129
2 changed files with 7 additions and 8 deletions

View File

@@ -376,13 +376,10 @@ int TestResultModel::resultTypeCount(ResultType type) const
{
int result = 0;
for (const auto &resultsForId : m_testResultCount.values())
result += resultsForId.value(type, 0);
for (const auto &id : m_reportedSummary.keys()) {
if (int counted = m_testResultCount.value(id).value(type))
result -= counted;
result += m_reportedSummary[id].value(type);
// if we got a result count from the framework prefer that over our counted results
int reported = m_reportedSummary[id].value(type);
result += reported != 0 ? reported : m_testResultCount.value(id).value(type);
}
return result;
}