summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/expected_globaldata.xunitxml
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2017-07-18 11:57:02 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-03-29 14:00:03 +0000
commitb82b3f40673f2d3c8ec73c075b645890480b74b7 (patch)
treee5b93f83f9da43fb058c803f5b8d2f1e18f23bc8 /tests/auto/testlib/selftests/expected_globaldata.xunitxml
parentbab398aba3019cbc6a947bef7708c41efc807777 (diff)
Fix the skip-check in TestMethods::invokeTest()
TestMethods::invokeTest() has an outer loop on global data (albeit with a comment that said otherwise). On its first cycle, we run the test function's *_data() method, if it has one; there is an inner loop on the rows this created. If the *_data() QSKIP()s, we need to skip the whole test; otherwise, a QSKIP() in one sub-test should not lead to skipping the remaining sub-tests. Moved the check for *_data() QSKIP()ping to right after *_data() returns, inside the "first global cycle" block that runs it. Previously, this check was done before entering the loop on local data rows, but outside that "first global cycle" block: consequently, later global cycles would fall foul of this check (even though the *_data() hasn't been run in this cycle, much less QSKIP()ped in it) if the last sub-test of the previous global cycle had QSKIP()ped. When running a single test for one specific data row, if the test's *_data() QSKIP()ped, this misplaced check would also have lead to a misleading "Unknown testdata" warning. Changed testlib/selftests' tst_globaldata::skipSingle() to trigger the bug (by having its last local row of first global row skip, which caused the second global row to be omitted) to verify this is also fixed; and amended one of its comments to reflect what's now to be expected. Updated the test's expected output files. Task-number: QTBUG-61774 Change-Id: I99596b595c6d1184038f23383844c6ff51a0cd91 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'tests/auto/testlib/selftests/expected_globaldata.xunitxml')
-rw-r--r--tests/auto/testlib/selftests/expected_globaldata.xunitxml18
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/auto/testlib/selftests/expected_globaldata.xunitxml b/tests/auto/testlib/selftests/expected_globaldata.xunitxml
index b135240d26..de184c2fdd 100644
--- a/tests/auto/testlib/selftests/expected_globaldata.xunitxml
+++ b/tests/auto/testlib/selftests/expected_globaldata.xunitxml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite errors="37" failures="0" tests="6" name="tst_globaldata">
+<testsuite errors="43" failures="0" tests="6" name="tst_globaldata">
<properties>
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
@@ -36,13 +36,19 @@
<!-- tag="global=false:local=true" message="init skipLocal local=true" type="qdebug" -->
<!-- tag="global=false:local=true" message="skipping" type="skip" -->
<!-- tag="global=false:local=true" message="cleanup skipLocal local=true" type="qdebug" -->
+ <!-- tag="global=true:local=false" message="init skipLocal local=false" type="qdebug" -->
+ <!-- tag="global=true:local=false" message="skipping" type="skip" -->
+ <!-- tag="global=true:local=false" message="cleanup skipLocal local=false" type="qdebug" -->
+ <!-- tag="global=true:local=true" message="init skipLocal local=true" type="qdebug" -->
+ <!-- tag="global=true:local=true" message="skipping" type="skip" -->
+ <!-- tag="global=true:local=true" message="cleanup skipLocal local=true" type="qdebug" -->
</testcase>
<testcase result="pass" name="skipSingle">
<!-- tag="global=false:local=false" message="init skipSingle local=false" type="qdebug" -->
<!-- tag="global=false:local=false" message="global: false local: false" type="qdebug" -->
<!-- tag="global=false:local=false" message="cleanup skipSingle local=false" type="qdebug" -->
<!-- tag="global=false:local=true" message="init skipSingle local=true" type="qdebug" -->
- <!-- tag="global=false:local=true" message="global: false local: true" type="qdebug" -->
+ <!-- tag="global=false:local=true" message="Skipping" type="skip" -->
<!-- tag="global=false:local=true" message="cleanup skipSingle local=true" type="qdebug" -->
<!-- tag="global=true:local=false" message="init skipSingle local=false" type="qdebug" -->
<!-- tag="global=true:local=false" message="Skipping" type="skip" -->
@@ -79,11 +85,17 @@
<![CDATA[init skipLocal local=true]]>
<![CDATA[skipping]]>
<![CDATA[cleanup skipLocal local=true]]>
+<![CDATA[init skipLocal local=false]]>
+<![CDATA[skipping]]>
+<![CDATA[cleanup skipLocal local=false]]>
+<![CDATA[init skipLocal local=true]]>
+<![CDATA[skipping]]>
+<![CDATA[cleanup skipLocal local=true]]>
<![CDATA[init skipSingle local=false]]>
<![CDATA[global: false local: false]]>
<![CDATA[cleanup skipSingle local=false]]>
<![CDATA[init skipSingle local=true]]>
-<![CDATA[global: false local: true]]>
+<![CDATA[Skipping]]>
<![CDATA[cleanup skipSingle local=true]]>
<![CDATA[init skipSingle local=false]]>
<![CDATA[Skipping]]>