diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2017-07-18 11:57:02 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-03-29 14:00:03 +0000 |
commit | b82b3f40673f2d3c8ec73c075b645890480b74b7 (patch) | |
tree | e5b93f83f9da43fb058c803f5b8d2f1e18f23bc8 /tests/auto/testlib/selftests/expected_globaldata.tap | |
parent | bab398aba3019cbc6a947bef7708c41efc807777 (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.tap')
-rw-r--r-- | tests/auto/testlib/selftests/expected_globaldata.tap | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/tests/auto/testlib/selftests/expected_globaldata.tap b/tests/auto/testlib/selftests/expected_globaldata.tap index 318299992f..4d61b7437b 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.tap +++ b/tests/auto/testlib/selftests/expected_globaldata.tap @@ -29,24 +29,29 @@ ok 7 - skipLocal(global=false:local=false) # SKIP skipping # init skipLocal local=true ok 8 - skipLocal(global=false:local=true) # SKIP skipping # cleanup skipLocal local=true +# init skipLocal local=false +ok 9 - skipLocal(global=true:local=false) # SKIP skipping +# cleanup skipLocal local=false +# init skipLocal local=true +ok 10 - skipLocal(global=true:local=true) # SKIP skipping +# cleanup skipLocal local=true # init skipSingle local=false # global: false local: false # cleanup skipSingle local=false -ok 9 - skipSingle(global=false:local=false) +ok 11 - skipSingle(global=false:local=false) # init skipSingle local=true -# global: false local: true +ok 12 - skipSingle(global=false:local=true) # SKIP Skipping # cleanup skipSingle local=true -ok 10 - skipSingle(global=false:local=true) # init skipSingle local=false -ok 11 - skipSingle(global=true:local=false) # SKIP Skipping +ok 13 - skipSingle(global=true:local=false) # SKIP Skipping # cleanup skipSingle local=false # init skipSingle local=true # global: true local: true # cleanup skipSingle local=true -ok 12 - skipSingle(global=true:local=true) +ok 14 - skipSingle(global=true:local=true) # cleanupTestCase cleanupTestCase (null) -ok 13 - cleanupTestCase() -1..13 -# tests 13 -# pass 9 +ok 15 - cleanupTestCase() +1..15 +# tests 15 +# pass 8 # fail 0 |