diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2022-02-01 17:02:19 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2022-02-02 23:08:37 +0100 |
commit | a605b9297d03943dbd7464f823460c9934aa2c31 (patch) | |
tree | 8f1eafcb567e0bfa01650a20b4d6b90f80edc9b6 /tests/auto/testlib | |
parent | 63f79d7ffb22de89a2c6314caa5b5a1908590063 (diff) |
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
Pick-to: 5.15 6.2 6.3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r-- | tests/auto/testlib/selftests/tst_selftests.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index b706b41905..9b7f6a55d5 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(" <QtBuild") // XML, Light XML build string |