From 5cb10bda5d40941cd3cd1429501fde6737af558f Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 1 Feb 2022 17:02:19 +0100 Subject: QPlainTestLogger: do not print "failure location" if there's no failure When running a test under increased verbosity levels, QTestLib would print "failure location" for every QTest function (QVERIFY, QCOMPARE, ...), even if there's no failure at all. Keep the code centralized, but split the formatting of failures and non-failures (other messages). Task-number: QTBUG-96844 Change-Id: I3c508653176b68579dc0eb0cffcc153a52da2e2c Reviewed-by: Edward Welbourne Reviewed-by: Volker Hilsheimer (cherry picked from commit a605b9297d03943dbd7464f823460c9934aa2c31) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/testlib/selftests/tst_selftests.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/auto/testlib/selftests/tst_selftests.cpp') diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 829a79c0e6..66e7ca5b99 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -822,6 +822,8 @@ bool tst_Selftests::compareOutput(const QString &logger, const QString &subdir, continue; if (actualLineBA.endsWith(" : failure location")) continue; + if (actualLineBA.endsWith(" : message location")) + continue; if (actualLineBA.startsWith("Config: Using QtTest library") // Text build string || actualLineBA.startsWith("