From 543e7051ac07204846b3624508f67013aa8c6e91 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') diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 78b8e6ac3a..530414c326 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -220,6 +220,8 @@ bool 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("