summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-09-27 16:05:46 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-12-09 20:54:26 +0100
commit8d0b5270fa57f9825215ffdb29ad450457ddb05b (patch)
tree955179fc1282c61dd9566cf59e37b780d8f9f7c8 /src/testlib
parent24b4f5b16cd27371152154dc667387d6f54713ff (diff)
TAP test logger: skip XFail results as well as pass after an XFail
The rationale for skipping pass after XFail is "to emit a single test point for" the test; emitting several XFails violates that aim. Task-number: QTBUG-96844 Change-Id: Ia8626dfc2dded234b3aa530fc2dc2324f1e28400 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtaptestlogger.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/testlib/qtaptestlogger.cpp b/src/testlib/qtaptestlogger.cpp
index 840624fa3b..30712c274a 100644
--- a/src/testlib/qtaptestlogger.cpp
+++ b/src/testlib/qtaptestlogger.cpp
@@ -115,7 +115,8 @@ void QTapTestLogger::outputTestLine(bool ok, int testNumber, QTestCharBuffer &di
void QTapTestLogger::addIncident(IncidentTypes type, const char *description,
const char *file, int line)
{
- if (m_wasExpectedFail && (type == Pass || type == BlacklistedPass)) {
+ if (m_wasExpectedFail && (type == Pass || type == BlacklistedPass
+ || type == XFail || type == BlacklistedXFail)) {
// XFail comes with a corresponding Pass incident, but we only want
// to emit a single test point for it, so skip the this pass.
return;