testlib: Don't report blacklisted tests as failures in JUnit reporter

We don't produce <failure> elements for them, so we shouldn't include
them in the total count of failures.

In the future we might produce <skipped> elements instead, but for now
remove the incorrect increment.

Pick-to: 6.2
Change-Id: Ia89a5cdaf79f6aa2f92be53180112c40ad6da2c6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Tor Arne Vestbø 2021-08-06 13:22:06 +02:00
parent 84a93d94ac
commit eb4fb9fa32
2 changed files with 1 additions and 3 deletions

View File

@ -240,14 +240,12 @@ void QJUnitTestLogger::addIncident(IncidentTypes type, const char *description,
typeBuf = "bpass";
break;
case QAbstractTestLogger::BlacklistedFail:
++failureCounter;
typeBuf = "bfail";
break;
case QAbstractTestLogger::BlacklistedXPass:
typeBuf = "bxpass";
break;
case QAbstractTestLogger::BlacklistedXFail:
++failureCounter;
typeBuf = "bxfail";
break;
default:

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite name="tst_Blacklisted" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="7" failures="2" errors="0" skipped="1" time="@TEST_DURATION@">
<testsuite name="tst_Blacklisted" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="7" failures="0" errors="0" skipped="1" time="@TEST_DURATION@">
<properties>
<property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/>
<property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/>