From 58b0d72f8d0b7720855da3e5d4513fe3897827e5 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 11 Mar 2022 13:37:39 +0100 Subject: [PATCH] TAP test logger: treat blacklisted XFail the same as XFail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In all places but one they were treated the same; fix that last one to match the rest. This removes one line from the YAML block for each blacklisted XFail test; in each case, this message duplicates the one on its "not ok ... # TODO..." test line. Change-Id: Iff2028afccd979db7f2c84e85d1b78541900008e Reviewed-by: Tor Arne Vestbø Reviewed-by: Mårten Nordheim --- src/testlib/qtaptestlogger.cpp | 2 +- tests/auto/testlib/selftests/expected_blacklisted.tap | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/testlib/qtaptestlogger.cpp b/src/testlib/qtaptestlogger.cpp index 77c00f826e..5fc1fcbf4c 100644 --- a/src/testlib/qtaptestlogger.cpp +++ b/src/testlib/qtaptestlogger.cpp @@ -176,7 +176,7 @@ void QTapTestLogger::addIncident(IncidentTypes type, const char *description, outputString(YAML_INDENT "---\n"); - if (type != XFail) { + if (type != XFail && type != BlacklistedXFail) { #if QT_CONFIG(regularexpression) // This is fragile, but unfortunately testlib doesn't plumb // the expected and actual values to the loggers (yet). diff --git a/tests/auto/testlib/selftests/expected_blacklisted.tap b/tests/auto/testlib/selftests/expected_blacklisted.tap index 63a0e90e21..ad3986537f 100644 --- a/tests/auto/testlib/selftests/expected_blacklisted.tap +++ b/tests/auto/testlib/selftests/expected_blacklisted.tap @@ -18,7 +18,6 @@ not ok 4 - fail() # TODO 'false' returned FALSE. (This test should BFAIL) ... not ok 5 - xfail() # TODO This test should BXFAIL then BPASS --- - # This test should BXFAIL then BPASS at: tst_Blacklisted::xfail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 @@ -113,7 +112,6 @@ not ok 7 - multiFail() # TODO But this test should only contribute one to the bl ... not ok 8 - xfailContinueSkip() # TODO This test should BXFAIL then SKIP --- - # This test should BXFAIL then SKIP at: tst_Blacklisted::xfailContinueSkip() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 @@ -121,7 +119,6 @@ not ok 8 - xfailContinueSkip() # TODO This test should BXFAIL then SKIP ok 8 - xfailContinueSkip() # SKIP This skip should be seen and counted not ok 9 - xfailContinueFail() # TODO This test should BXFAIL then BFAIL --- - # This test should BXFAIL then BFAIL at: tst_Blacklisted::xfailContinueFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0