summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index e63f8a427f..0e5d947bc4 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -868,6 +868,7 @@ void checkTestOutput(const QString &test, const TestLogger &logger, const QByteA
return true;
};
+ bool foundExpectionFile = false;
for (int version = 0; !expectationMatched; ++version) {
// Look for a test expectation file. Most tests only have a single
// expectation file, while some have multiple versions that should
@@ -888,12 +889,14 @@ void checkTestOutput(const QString &test, const TestLogger &logger, const QByteA
} else {
// No more versions found, and still no match
assert(!expectationMatched);
- outputMessage += "Could not find any expectation files for subtest '" + test + "'";
+ if (!foundExpectionFile)
+ outputMessage += "Could not find any expectation files for subtest '" + test + "'";
break;
}
}
// Found expected result
+ foundExpectionFile = true;
QString errorMessage;
auto expectedLines = splitLines(expected);
if (compareOutput(logger.shortName(), test, actual, actualLines, expectedLines, &errorMessage)) {