summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/expected_blacklisted.tap
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-03-14 19:22:18 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2022-03-29 22:21:58 +0200
commit784f5d76b928c42f41c62a281118eeda9ffced71 (patch)
treeacbf87041662f451e35ae7d162ee4aa936c3788f /tests/auto/testlib/selftests/expected_blacklisted.tap
parentac38401d3112f2ffeca072b65e1a254a9469fe30 (diff)
TAP test logger: report B?XFAIL (mostly) as a message
Previously, only the first B?XFAIL would be reported, all others would be discarded. Furthermore, if a B?XFAIL had happened, B?PASS was also not reported, since the B?XFAIL served as test line. However, if the B?XFAIL was followed by a SKIP, B?XPASS or B?FAIL, these were reported as normal, producing exactly the kind of duplicated test line that the skipping of B?PASS was meant to supply. So change B?XFAIL to be reported among the messages, but retain the TODO annotation of the first on the test line of a subsequent B?PASS, if nothing more drastic happens in the mean time. So now more than one B?XFAIL can be reported, the test is still marked as a TODO and we don't get duplicate test lines for a subsequent non-passing result. This replaces the bool m_wasExpectedFail member with a QTestCharBuffer m_firstExpectedFail that records the first XFAIL's TODO line (so its isEmpty() fully replaces m_wasExpectedFail). Previously, the at/file/line information for a B?XFail would be supplied as top-level keys in the YAML block for a "Pass" reported as not ok due to the XFail, as this location information is now part of the B?XFail's message in the extensions/messages block. Duplicating the first B?XFail's location at top level would add complexity and is arguably misleading, as the test result is really a pass (after ignoring known issues), and the location of the pass is indeterminate (nominally the end of the test function, but actually also after the cleanup() call for this test, when relevant), which is why a Pass has no location information. Task-number: QTBUG-96844 Change-Id: Ib3f24f56266ff49bf3bc9759ac8263ac69a62130 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/auto/testlib/selftests/expected_blacklisted.tap')
-rw-r--r--tests/auto/testlib/selftests/expected_blacklisted.tap33
1 files changed, 22 insertions, 11 deletions
diff --git a/tests/auto/testlib/selftests/expected_blacklisted.tap b/tests/auto/testlib/selftests/expected_blacklisted.tap
index 3217b42a4f..83def09e34 100644
--- a/tests/auto/testlib/selftests/expected_blacklisted.tap
+++ b/tests/auto/testlib/selftests/expected_blacklisted.tap
@@ -23,9 +23,13 @@ not ok 4 - fail() # TODO 'false' returned FALSE. (This test should BFAIL)
...
not ok 5 - xfail() # TODO 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
+ extensions:
+ messages:
+ - severity: xfail
+ message: 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
...
ok 6 - multiSkip() # SKIP This skip should be repeated ten times
ok 6 - multiSkip() # SKIP This skip should be repeated ten times
@@ -104,24 +108,31 @@ not ok 7 - multiFail() # TODO But this test should only contribute one to the bl
file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
line: 0
...
-not ok 8 - xfailContinueSkip() # TODO This test should BXFAIL then SKIP
+not ok 8 - xfailContinueSkip() # SKIP This skip should be seen and counted
---
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
- ...
-ok 8 - xfailContinueSkip() # SKIP This skip should be seen and counted
-not ok 9 - xfailContinueFail() # TODO 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
+ extensions:
+ messages:
+ - severity: xfail
+ message: 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
...
not ok 9 - xfailContinueFail() # TODO This fail should be seen and counted as blacklisted
---
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
+ extensions:
+ messages:
+ - severity: xfail
+ message: 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
...
ok 10 - xpass() # TODO 'true' returned TRUE unexpectedly. (This test should BXPASS)
ok 11 - xpassContinueSkip() # TODO 'true' returned TRUE unexpectedly. (This test should BXPASS then SKIP)