Test skip and fail in cleanup() as well as in cleanupTestCase()
The skipcleanup and failcleanup tests were actually testing skip and fail in cleanupTestCase(), not in cleanup(). Add almost-duplicate tests and clean up so that we now have {fail,skip}cleanup(,testcase} tests to cover all four cases. Generated expected output. The new tests (with old names) get their fail or skip - during cleanup() - reported against the test instead of the cleanupTestCase function. (Results for {init,cleanup}TestCase() are always reported, even when these slots are not defined, as no-op passes.) Pick-to: 6.4 Change-Id: I0988d1696b50c0e2f30c45ddc25e1bd0bfd2151a Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
parent
afbae9c2ac
commit
21e9c223b7
@ -60,6 +60,7 @@ set(subprograms
|
||||
expectfail
|
||||
extendedcompare
|
||||
failcleanup
|
||||
failcleanuptestcase
|
||||
faildatatype
|
||||
failfetchtype
|
||||
failinit
|
||||
@ -82,6 +83,7 @@ set(subprograms
|
||||
singleskip
|
||||
skip
|
||||
skipcleanup
|
||||
skipcleanuptestcase
|
||||
skipinit
|
||||
skipinitdata
|
||||
sleep
|
||||
|
@ -6,8 +6,8 @@
|
||||
<property name="QtBuild" value=""/>
|
||||
</properties>
|
||||
<testcase name="initTestCase" classname="tst_FailCleanup" time="@TEST_DURATION@"/>
|
||||
<testcase name="aTestFunction" classname="tst_FailCleanup" time="@TEST_DURATION@"/>
|
||||
<testcase name="cleanupTestCase" classname="tst_FailCleanup" time="@TEST_DURATION@">
|
||||
<failure type="fail" message="'false' returned FALSE. (Fail inside cleanupTestCase)"/>
|
||||
<testcase name="aTestFunction" classname="tst_FailCleanup" time="@TEST_DURATION@">
|
||||
<failure type="fail" message="'false' returned FALSE. (Fail inside cleanup)"/>
|
||||
</testcase>
|
||||
<testcase name="cleanupTestCase" classname="tst_FailCleanup" time="@TEST_DURATION@"/>
|
||||
</testsuite>
|
||||
|
@ -8,13 +8,13 @@
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="aTestFunction">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp" line="0">
|
||||
<Description><![CDATA['false' returned FALSE. (Fail inside cleanupTestCase)]]></Description>
|
||||
<Description><![CDATA['false' returned FALSE. (Fail inside cleanup)]]></Description>
|
||||
</Incident>
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<Duration msecs="0"/>
|
||||
|
@ -1,19 +1,19 @@
|
||||
TAP version 13
|
||||
# tst_FailCleanup
|
||||
ok 1 - initTestCase()
|
||||
ok 2 - aTestFunction()
|
||||
not ok 3 - cleanupTestCase()
|
||||
not ok 2 - aTestFunction()
|
||||
---
|
||||
type: QVERIFY
|
||||
message: Fail inside cleanupTestCase
|
||||
message: Fail inside cleanup
|
||||
wanted: true (false)
|
||||
found: false (false)
|
||||
expected: true (false)
|
||||
actual: false (false)
|
||||
at: tst_FailCleanup::cleanupTestCase() (qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp:0)
|
||||
at: tst_FailCleanup::aTestFunction() (qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp:0)
|
||||
file: qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp
|
||||
line: 0
|
||||
...
|
||||
ok 3 - cleanupTestCase()
|
||||
1..3
|
||||
# tests 3
|
||||
# pass 2
|
||||
|
@ -2,8 +2,8 @@
|
||||
##teamcity[testStarted name='initTestCase()' flowId='tst_FailCleanup']
|
||||
##teamcity[testFinished name='initTestCase()' flowId='tst_FailCleanup']
|
||||
##teamcity[testStarted name='aTestFunction()' flowId='tst_FailCleanup']
|
||||
##teamcity[testFailed name='aTestFunction()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp(0)|]' details='|'false|' returned FALSE. (Fail inside cleanup)' flowId='tst_FailCleanup']
|
||||
##teamcity[testFinished name='aTestFunction()' flowId='tst_FailCleanup']
|
||||
##teamcity[testStarted name='cleanupTestCase()' flowId='tst_FailCleanup']
|
||||
##teamcity[testFailed name='cleanupTestCase()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp(0)|]' details='|'false|' returned FALSE. (Fail inside cleanupTestCase)' flowId='tst_FailCleanup']
|
||||
##teamcity[testFinished name='cleanupTestCase()' flowId='tst_FailCleanup']
|
||||
##teamcity[testSuiteFinished name='tst_FailCleanup' flowId='tst_FailCleanup']
|
||||
|
@ -1,8 +1,8 @@
|
||||
********* Start testing of tst_FailCleanup *********
|
||||
Config: Using QtTest library
|
||||
PASS : tst_FailCleanup::initTestCase()
|
||||
PASS : tst_FailCleanup::aTestFunction()
|
||||
FAIL! : tst_FailCleanup::cleanupTestCase() 'false' returned FALSE. (Fail inside cleanupTestCase)
|
||||
FAIL! : tst_FailCleanup::aTestFunction() 'false' returned FALSE. (Fail inside cleanup)
|
||||
Loc: [qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp(0)]
|
||||
PASS : tst_FailCleanup::cleanupTestCase()
|
||||
Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms
|
||||
********* Finished testing of tst_FailCleanup *********
|
||||
|
@ -10,13 +10,13 @@
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="aTestFunction">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp" line="0">
|
||||
<Description><![CDATA['false' returned FALSE. (Fail inside cleanup)]]></Description>
|
||||
</Incident>
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp" line="0">
|
||||
<Description><![CDATA['false' returned FALSE. (Fail inside cleanupTestCase)]]></Description>
|
||||
</Incident>
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<Duration msecs="0"/>
|
||||
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<testsuite name="tst_FailCleanupTestCase" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="3" failures="1" errors="0" skipped="0" time="@TEST_DURATION@">
|
||||
<properties>
|
||||
<property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/>
|
||||
<property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/>
|
||||
<property name="QtBuild" value=""/>
|
||||
</properties>
|
||||
<testcase name="initTestCase" classname="tst_FailCleanupTestCase" time="@TEST_DURATION@"/>
|
||||
<testcase name="aTestFunction" classname="tst_FailCleanupTestCase" time="@TEST_DURATION@"/>
|
||||
<testcase name="cleanupTestCase" classname="tst_FailCleanupTestCase" time="@TEST_DURATION@">
|
||||
<failure type="fail" message="'false' returned FALSE. (Fail inside cleanupTestCase)"/>
|
||||
</testcase>
|
||||
</testsuite>
|
@ -0,0 +1,20 @@
|
||||
<Environment>
|
||||
<QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
|
||||
<QtBuild/>
|
||||
<QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
|
||||
</Environment>
|
||||
<TestFunction name="initTestCase">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="aTestFunction">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp" line="0">
|
||||
<Description><![CDATA['false' returned FALSE. (Fail inside cleanupTestCase)]]></Description>
|
||||
</Incident>
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<Duration msecs="0"/>
|
@ -0,0 +1,20 @@
|
||||
TAP version 13
|
||||
# tst_FailCleanupTestCase
|
||||
ok 1 - initTestCase()
|
||||
ok 2 - aTestFunction()
|
||||
not ok 3 - cleanupTestCase()
|
||||
---
|
||||
type: QVERIFY
|
||||
message: Fail inside cleanupTestCase
|
||||
wanted: true (false)
|
||||
found: false (false)
|
||||
expected: true (false)
|
||||
actual: false (false)
|
||||
at: tst_FailCleanupTestCase::cleanupTestCase() (qtbase/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp:0)
|
||||
file: qtbase/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp
|
||||
line: 0
|
||||
...
|
||||
1..3
|
||||
# tests 3
|
||||
# pass 2
|
||||
# fail 1
|
@ -0,0 +1,9 @@
|
||||
##teamcity[testSuiteStarted name='tst_FailCleanupTestCase' flowId='tst_FailCleanupTestCase']
|
||||
##teamcity[testStarted name='initTestCase()' flowId='tst_FailCleanupTestCase']
|
||||
##teamcity[testFinished name='initTestCase()' flowId='tst_FailCleanupTestCase']
|
||||
##teamcity[testStarted name='aTestFunction()' flowId='tst_FailCleanupTestCase']
|
||||
##teamcity[testFinished name='aTestFunction()' flowId='tst_FailCleanupTestCase']
|
||||
##teamcity[testStarted name='cleanupTestCase()' flowId='tst_FailCleanupTestCase']
|
||||
##teamcity[testFailed name='cleanupTestCase()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp(0)|]' details='|'false|' returned FALSE. (Fail inside cleanupTestCase)' flowId='tst_FailCleanupTestCase']
|
||||
##teamcity[testFinished name='cleanupTestCase()' flowId='tst_FailCleanupTestCase']
|
||||
##teamcity[testSuiteFinished name='tst_FailCleanupTestCase' flowId='tst_FailCleanupTestCase']
|
@ -0,0 +1,8 @@
|
||||
********* Start testing of tst_FailCleanupTestCase *********
|
||||
Config: Using QtTest library
|
||||
PASS : tst_FailCleanupTestCase::initTestCase()
|
||||
PASS : tst_FailCleanupTestCase::aTestFunction()
|
||||
FAIL! : tst_FailCleanupTestCase::cleanupTestCase() 'false' returned FALSE. (Fail inside cleanupTestCase)
|
||||
Loc: [qtbase/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp(0)]
|
||||
Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms
|
||||
********* Finished testing of tst_FailCleanupTestCase *********
|
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TestCase name="tst_FailCleanupTestCase">
|
||||
<Environment>
|
||||
<QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
|
||||
<QtBuild/>
|
||||
<QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
|
||||
</Environment>
|
||||
<TestFunction name="initTestCase">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="aTestFunction">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp" line="0">
|
||||
<Description><![CDATA['false' returned FALSE. (Fail inside cleanupTestCase)]]></Description>
|
||||
</Incident>
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<Duration msecs="0"/>
|
||||
</TestCase>
|
@ -6,8 +6,8 @@
|
||||
<property name="QtBuild" value=""/>
|
||||
</properties>
|
||||
<testcase name="initTestCase" classname="tst_SkipCleanup" time="@TEST_DURATION@"/>
|
||||
<testcase name="aTestFunction" classname="tst_SkipCleanup" time="@TEST_DURATION@"/>
|
||||
<testcase name="cleanupTestCase" classname="tst_SkipCleanup" time="@TEST_DURATION@">
|
||||
<skipped message="Skip inside cleanupTestCase."/>
|
||||
<testcase name="aTestFunction" classname="tst_SkipCleanup" time="@TEST_DURATION@">
|
||||
<skipped message="Skip inside cleanup."/>
|
||||
</testcase>
|
||||
<testcase name="cleanupTestCase" classname="tst_SkipCleanup" time="@TEST_DURATION@"/>
|
||||
</testsuite>
|
||||
|
@ -8,13 +8,13 @@
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="aTestFunction">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="skip" file="qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp" line="0">
|
||||
<Description><![CDATA[Skip inside cleanupTestCase.]]></Description>
|
||||
<Description><![CDATA[Skip inside cleanup.]]></Description>
|
||||
</Incident>
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<Duration msecs="0"/>
|
||||
|
@ -1,8 +1,8 @@
|
||||
TAP version 13
|
||||
# tst_SkipCleanup
|
||||
ok 1 - initTestCase()
|
||||
ok 2 - aTestFunction()
|
||||
ok 3 - cleanupTestCase() # SKIP Skip inside cleanupTestCase.
|
||||
ok 2 - aTestFunction() # SKIP Skip inside cleanup.
|
||||
ok 3 - cleanupTestCase()
|
||||
1..3
|
||||
# tests 3
|
||||
# pass 2
|
||||
|
@ -2,8 +2,8 @@
|
||||
##teamcity[testStarted name='initTestCase()' flowId='tst_SkipCleanup']
|
||||
##teamcity[testFinished name='initTestCase()' flowId='tst_SkipCleanup']
|
||||
##teamcity[testStarted name='aTestFunction()' flowId='tst_SkipCleanup']
|
||||
##teamcity[testIgnored name='aTestFunction()' message='Skip inside cleanup. |[Loc: qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp(0)|]' flowId='tst_SkipCleanup']
|
||||
##teamcity[testFinished name='aTestFunction()' flowId='tst_SkipCleanup']
|
||||
##teamcity[testStarted name='cleanupTestCase()' flowId='tst_SkipCleanup']
|
||||
##teamcity[testIgnored name='cleanupTestCase()' message='Skip inside cleanupTestCase. |[Loc: qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp(0)|]' flowId='tst_SkipCleanup']
|
||||
##teamcity[testFinished name='cleanupTestCase()' flowId='tst_SkipCleanup']
|
||||
##teamcity[testSuiteFinished name='tst_SkipCleanup' flowId='tst_SkipCleanup']
|
||||
|
@ -1,8 +1,8 @@
|
||||
********* Start testing of tst_SkipCleanup *********
|
||||
Config: Using QtTest library
|
||||
PASS : tst_SkipCleanup::initTestCase()
|
||||
PASS : tst_SkipCleanup::aTestFunction()
|
||||
SKIP : tst_SkipCleanup::cleanupTestCase() Skip inside cleanupTestCase.
|
||||
SKIP : tst_SkipCleanup::aTestFunction() Skip inside cleanup.
|
||||
Loc: [qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp(0)]
|
||||
PASS : tst_SkipCleanup::cleanupTestCase()
|
||||
Totals: 2 passed, 0 failed, 1 skipped, 0 blacklisted, 0ms
|
||||
********* Finished testing of tst_SkipCleanup *********
|
||||
|
@ -10,13 +10,13 @@
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="aTestFunction">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Incident type="skip" file="qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp" line="0">
|
||||
<Description><![CDATA[Skip inside cleanup.]]></Description>
|
||||
</Incident>
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="skip" file="qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp" line="0">
|
||||
<Description><![CDATA[Skip inside cleanupTestCase.]]></Description>
|
||||
</Incident>
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<Duration msecs="0"/>
|
||||
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<testsuite name="tst_SkipCleanupTestCase" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="3" 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@"/>
|
||||
<property name="QtBuild" value=""/>
|
||||
</properties>
|
||||
<testcase name="initTestCase" classname="tst_SkipCleanupTestCase" time="@TEST_DURATION@"/>
|
||||
<testcase name="aTestFunction" classname="tst_SkipCleanupTestCase" time="@TEST_DURATION@"/>
|
||||
<testcase name="cleanupTestCase" classname="tst_SkipCleanupTestCase" time="@TEST_DURATION@">
|
||||
<skipped message="Skip inside cleanupTestCase."/>
|
||||
</testcase>
|
||||
</testsuite>
|
@ -0,0 +1,20 @@
|
||||
<Environment>
|
||||
<QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
|
||||
<QtBuild/>
|
||||
<QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
|
||||
</Environment>
|
||||
<TestFunction name="initTestCase">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="aTestFunction">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="skip" file="qtbase/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp" line="0">
|
||||
<Description><![CDATA[Skip inside cleanupTestCase.]]></Description>
|
||||
</Incident>
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<Duration msecs="0"/>
|
@ -0,0 +1,9 @@
|
||||
TAP version 13
|
||||
# tst_SkipCleanupTestCase
|
||||
ok 1 - initTestCase()
|
||||
ok 2 - aTestFunction()
|
||||
ok 3 - cleanupTestCase() # SKIP Skip inside cleanupTestCase.
|
||||
1..3
|
||||
# tests 3
|
||||
# pass 2
|
||||
# fail 0
|
@ -0,0 +1,9 @@
|
||||
##teamcity[testSuiteStarted name='tst_SkipCleanupTestCase' flowId='tst_SkipCleanupTestCase']
|
||||
##teamcity[testStarted name='initTestCase()' flowId='tst_SkipCleanupTestCase']
|
||||
##teamcity[testFinished name='initTestCase()' flowId='tst_SkipCleanupTestCase']
|
||||
##teamcity[testStarted name='aTestFunction()' flowId='tst_SkipCleanupTestCase']
|
||||
##teamcity[testFinished name='aTestFunction()' flowId='tst_SkipCleanupTestCase']
|
||||
##teamcity[testStarted name='cleanupTestCase()' flowId='tst_SkipCleanupTestCase']
|
||||
##teamcity[testIgnored name='cleanupTestCase()' message='Skip inside cleanupTestCase. |[Loc: qtbase/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp(0)|]' flowId='tst_SkipCleanupTestCase']
|
||||
##teamcity[testFinished name='cleanupTestCase()' flowId='tst_SkipCleanupTestCase']
|
||||
##teamcity[testSuiteFinished name='tst_SkipCleanupTestCase' flowId='tst_SkipCleanupTestCase']
|
@ -0,0 +1,8 @@
|
||||
********* Start testing of tst_SkipCleanupTestCase *********
|
||||
Config: Using QtTest library
|
||||
PASS : tst_SkipCleanupTestCase::initTestCase()
|
||||
PASS : tst_SkipCleanupTestCase::aTestFunction()
|
||||
SKIP : tst_SkipCleanupTestCase::cleanupTestCase() Skip inside cleanupTestCase.
|
||||
Loc: [qtbase/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp(0)]
|
||||
Totals: 2 passed, 0 failed, 1 skipped, 0 blacklisted, 0ms
|
||||
********* Finished testing of tst_SkipCleanupTestCase *********
|
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TestCase name="tst_SkipCleanupTestCase">
|
||||
<Environment>
|
||||
<QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
|
||||
<QtBuild/>
|
||||
<QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
|
||||
</Environment>
|
||||
<TestFunction name="initTestCase">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="aTestFunction">
|
||||
<Incident type="pass" file="" line="0" />
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<TestFunction name="cleanupTestCase">
|
||||
<Incident type="skip" file="qtbase/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp" line="0">
|
||||
<Description><![CDATA[Skip inside cleanupTestCase.]]></Description>
|
||||
</Incident>
|
||||
<Duration msecs="0"/>
|
||||
</TestFunction>
|
||||
<Duration msecs="0"/>
|
||||
</TestCase>
|
@ -1,12 +1,10 @@
|
||||
# Generated from failcleanup.pro.
|
||||
|
||||
#####################################################################
|
||||
## failcleanup Binary:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_executable(failcleanup
|
||||
NO_INSTALL # special case
|
||||
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
|
||||
NO_INSTALL
|
||||
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
SOURCES
|
||||
tst_failcleanup.cpp
|
||||
PUBLIC_LIBRARIES
|
||||
@ -16,6 +14,4 @@ qt_internal_add_executable(failcleanup
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
# special case begin
|
||||
qt_internal_apply_testlib_coverage_options(failcleanup)
|
||||
# special case end
|
||||
|
@ -8,7 +8,7 @@ class tst_FailCleanup: public QObject
|
||||
Q_OBJECT
|
||||
private slots:
|
||||
void aTestFunction() const;
|
||||
void cleanupTestCase() const;
|
||||
void cleanup() const;
|
||||
};
|
||||
|
||||
void tst_FailCleanup::aTestFunction() const
|
||||
@ -16,9 +16,9 @@ void tst_FailCleanup::aTestFunction() const
|
||||
QVERIFY(true);
|
||||
}
|
||||
|
||||
void tst_FailCleanup::cleanupTestCase() const
|
||||
void tst_FailCleanup::cleanup() const
|
||||
{
|
||||
QVERIFY2(false, "Fail inside cleanupTestCase");
|
||||
QVERIFY2(false, "Fail inside cleanup");
|
||||
}
|
||||
|
||||
QTEST_APPLESS_MAIN(tst_FailCleanup)
|
||||
|
@ -0,0 +1,17 @@
|
||||
#####################################################################
|
||||
## failcleanuptestcase Binary:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_executable(failcleanuptestcase
|
||||
NO_INSTALL
|
||||
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
SOURCES
|
||||
tst_failcleanuptestcase.cpp
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Test
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_apply_testlib_coverage_options(failcleanuptestcase)
|
@ -0,0 +1,25 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <QTest>
|
||||
|
||||
class tst_FailCleanupTestCase: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
private slots:
|
||||
void aTestFunction() const;
|
||||
void cleanupTestCase() const;
|
||||
};
|
||||
|
||||
void tst_FailCleanupTestCase::aTestFunction() const
|
||||
{
|
||||
QVERIFY(true);
|
||||
}
|
||||
|
||||
void tst_FailCleanupTestCase::cleanupTestCase() const
|
||||
{
|
||||
QVERIFY2(false, "Fail inside cleanupTestCase");
|
||||
}
|
||||
|
||||
QTEST_APPLESS_MAIN(tst_FailCleanupTestCase)
|
||||
#include "tst_failcleanuptestcase.moc"
|
@ -32,14 +32,15 @@ TESTS = ['assert', 'badxml', 'benchlibcallgrind', 'benchlibcounting',
|
||||
'benchlibwalltime', 'blacklisted', 'cmptest', 'commandlinedata',
|
||||
'counting', 'crashes', 'datatable', 'datetime', 'deleteLater',
|
||||
'deleteLater_noApp', 'differentexec', 'exceptionthrow', 'expectfail',
|
||||
"extendedcompare", 'failcleanup', 'faildatatype', 'failfetchtype', 'failinit',
|
||||
'failinitdata', 'fetchbogus', 'findtestdata', 'float', 'globaldata',
|
||||
'longstring', 'maxwarnings', 'mouse', 'multiexec', 'pairdiagnostics', 'pass',
|
||||
"extendedcompare", 'failcleanup', 'failcleanuptestcase',
|
||||
'faildatatype', 'failfetchtype', 'failinit', 'failinitdata',
|
||||
'fetchbogus', 'findtestdata', 'float', 'globaldata', 'longstring',
|
||||
'maxwarnings', 'mouse', 'multiexec', 'pairdiagnostics', 'pass',
|
||||
'printdatatags', 'printdatatagswithglobaltags', 'qexecstringlist',
|
||||
'signaldumper', 'silent', 'singleskip', 'skip', 'skipcleanup',
|
||||
'skipinit', 'skipinitdata', 'sleep', 'strcmp', 'subtest', 'testlib',
|
||||
'tuplediagnostics', 'verbose1', 'verbose2', 'verifyexceptionthrown',
|
||||
'warnings', 'watchdog', 'junit', 'keyboard']
|
||||
'skipcleanuptestcase', 'skipinit', 'skipinitdata', 'sleep', 'strcmp',
|
||||
'subtest', 'testlib', 'tuplediagnostics', 'verbose1', 'verbose2',
|
||||
'verifyexceptionthrown', 'warnings', 'watchdog', 'junit', 'keyboard']
|
||||
|
||||
|
||||
class Fail (Exception): pass
|
||||
|
@ -1,12 +1,10 @@
|
||||
# Generated from skipcleanup.pro.
|
||||
|
||||
#####################################################################
|
||||
## skipcleanup Binary:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_executable(skipcleanup
|
||||
NO_INSTALL # special case
|
||||
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
|
||||
NO_INSTALL
|
||||
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
SOURCES
|
||||
tst_skipcleanup.cpp
|
||||
PUBLIC_LIBRARIES
|
||||
@ -16,6 +14,4 @@ qt_internal_add_executable(skipcleanup
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
# special case begin
|
||||
qt_internal_apply_testlib_coverage_options(skipcleanup)
|
||||
# special case end
|
||||
|
@ -8,7 +8,7 @@ class tst_SkipCleanup: public QObject
|
||||
Q_OBJECT
|
||||
private slots:
|
||||
void aTestFunction() const;
|
||||
void cleanupTestCase() const;
|
||||
void cleanup() const;
|
||||
};
|
||||
|
||||
void tst_SkipCleanup::aTestFunction() const
|
||||
@ -16,9 +16,9 @@ void tst_SkipCleanup::aTestFunction() const
|
||||
QVERIFY(true);
|
||||
}
|
||||
|
||||
void tst_SkipCleanup::cleanupTestCase() const
|
||||
void tst_SkipCleanup::cleanup() const
|
||||
{
|
||||
QSKIP("Skip inside cleanupTestCase.");
|
||||
QSKIP("Skip inside cleanup.");
|
||||
}
|
||||
|
||||
QTEST_APPLESS_MAIN(tst_SkipCleanup)
|
||||
|
@ -0,0 +1,17 @@
|
||||
#####################################################################
|
||||
## skipcleanuptestcase Binary:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_executable(skipcleanuptestcase
|
||||
NO_INSTALL
|
||||
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
SOURCES
|
||||
tst_skipcleanuptestcase.cpp
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Test
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_apply_testlib_coverage_options(skipcleanuptestcase)
|
@ -0,0 +1,25 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <QTest>
|
||||
|
||||
class tst_SkipCleanupTestCase: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
private slots:
|
||||
void aTestFunction() const;
|
||||
void cleanupTestCase() const;
|
||||
};
|
||||
|
||||
void tst_SkipCleanupTestCase::aTestFunction() const
|
||||
{
|
||||
QVERIFY(true);
|
||||
}
|
||||
|
||||
void tst_SkipCleanupTestCase::cleanupTestCase() const
|
||||
{
|
||||
QSKIP("Skip inside cleanupTestCase.");
|
||||
}
|
||||
|
||||
QTEST_APPLESS_MAIN(tst_SkipCleanupTestCase)
|
||||
#include "tst_skipcleanuptestcase.moc"
|
Loading…
Reference in New Issue
Block a user