diff --git a/tests/auto/testlib/selftests/CMakeLists.txt b/tests/auto/testlib/selftests/CMakeLists.txt
index f7315c7db6f..ceea1226f8e 100644
--- a/tests/auto/testlib/selftests/CMakeLists.txt
+++ b/tests/auto/testlib/selftests/CMakeLists.txt
@@ -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
diff --git a/tests/auto/testlib/selftests/expected_failcleanup.junitxml b/tests/auto/testlib/selftests/expected_failcleanup.junitxml
index a40c724a46c..8ea57993632 100644
--- a/tests/auto/testlib/selftests/expected_failcleanup.junitxml
+++ b/tests/auto/testlib/selftests/expected_failcleanup.junitxml
@@ -6,8 +6,8 @@
-
-
-
+
+
+
diff --git a/tests/auto/testlib/selftests/expected_failcleanup.lightxml b/tests/auto/testlib/selftests/expected_failcleanup.lightxml
index ce9da0d2a88..a9d7a1361fa 100644
--- a/tests/auto/testlib/selftests/expected_failcleanup.lightxml
+++ b/tests/auto/testlib/selftests/expected_failcleanup.lightxml
@@ -8,13 +8,13 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/tests/auto/testlib/selftests/expected_failcleanup.tap b/tests/auto/testlib/selftests/expected_failcleanup.tap
index 8ec0aca6d47..64556b32b25 100644
--- a/tests/auto/testlib/selftests/expected_failcleanup.tap
+++ b/tests/auto/testlib/selftests/expected_failcleanup.tap
@@ -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
diff --git a/tests/auto/testlib/selftests/expected_failcleanup.teamcity b/tests/auto/testlib/selftests/expected_failcleanup.teamcity
index 1f8d3535817..12d7b2f154b 100644
--- a/tests/auto/testlib/selftests/expected_failcleanup.teamcity
+++ b/tests/auto/testlib/selftests/expected_failcleanup.teamcity
@@ -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']
diff --git a/tests/auto/testlib/selftests/expected_failcleanup.txt b/tests/auto/testlib/selftests/expected_failcleanup.txt
index a5776e59bfb..4fac7940fd6 100644
--- a/tests/auto/testlib/selftests/expected_failcleanup.txt
+++ b/tests/auto/testlib/selftests/expected_failcleanup.txt
@@ -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 *********
diff --git a/tests/auto/testlib/selftests/expected_failcleanup.xml b/tests/auto/testlib/selftests/expected_failcleanup.xml
index 3521802ca0d..f4f041e704a 100644
--- a/tests/auto/testlib/selftests/expected_failcleanup.xml
+++ b/tests/auto/testlib/selftests/expected_failcleanup.xml
@@ -10,13 +10,13 @@
-
+
+
+
-
-
-
+
diff --git a/tests/auto/testlib/selftests/expected_failcleanuptestcase.junitxml b/tests/auto/testlib/selftests/expected_failcleanuptestcase.junitxml
new file mode 100644
index 00000000000..8e694a4dfe4
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failcleanuptestcase.junitxml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/auto/testlib/selftests/expected_failcleanuptestcase.lightxml b/tests/auto/testlib/selftests/expected_failcleanuptestcase.lightxml
new file mode 100644
index 00000000000..ed92e1e6b05
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failcleanuptestcase.lightxml
@@ -0,0 +1,20 @@
+
+ @INSERT_QT_VERSION_HERE@
+
+ @INSERT_QT_VERSION_HERE@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/auto/testlib/selftests/expected_failcleanuptestcase.tap b/tests/auto/testlib/selftests/expected_failcleanuptestcase.tap
new file mode 100644
index 00000000000..1bad92ce1f8
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failcleanuptestcase.tap
@@ -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
diff --git a/tests/auto/testlib/selftests/expected_failcleanuptestcase.teamcity b/tests/auto/testlib/selftests/expected_failcleanuptestcase.teamcity
new file mode 100644
index 00000000000..b76c7e3f454
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failcleanuptestcase.teamcity
@@ -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']
diff --git a/tests/auto/testlib/selftests/expected_failcleanuptestcase.txt b/tests/auto/testlib/selftests/expected_failcleanuptestcase.txt
new file mode 100644
index 00000000000..2e4619394b5
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failcleanuptestcase.txt
@@ -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 *********
diff --git a/tests/auto/testlib/selftests/expected_failcleanuptestcase.xml b/tests/auto/testlib/selftests/expected_failcleanuptestcase.xml
new file mode 100644
index 00000000000..1537440317d
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failcleanuptestcase.xml
@@ -0,0 +1,23 @@
+
+
+
+ @INSERT_QT_VERSION_HERE@
+
+ @INSERT_QT_VERSION_HERE@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.junitxml b/tests/auto/testlib/selftests/expected_skipcleanup.junitxml
index 88a5c250ffc..5ef20a0b2e8 100644
--- a/tests/auto/testlib/selftests/expected_skipcleanup.junitxml
+++ b/tests/auto/testlib/selftests/expected_skipcleanup.junitxml
@@ -6,8 +6,8 @@
-
-
-
+
+
+
diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.lightxml b/tests/auto/testlib/selftests/expected_skipcleanup.lightxml
index f2f8330bbc4..c97f125227b 100644
--- a/tests/auto/testlib/selftests/expected_skipcleanup.lightxml
+++ b/tests/auto/testlib/selftests/expected_skipcleanup.lightxml
@@ -8,13 +8,13 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.tap b/tests/auto/testlib/selftests/expected_skipcleanup.tap
index 4a3f8f852ce..36d979a84a2 100644
--- a/tests/auto/testlib/selftests/expected_skipcleanup.tap
+++ b/tests/auto/testlib/selftests/expected_skipcleanup.tap
@@ -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
diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.teamcity b/tests/auto/testlib/selftests/expected_skipcleanup.teamcity
index bdc3c0f70a5..b5c37091938 100644
--- a/tests/auto/testlib/selftests/expected_skipcleanup.teamcity
+++ b/tests/auto/testlib/selftests/expected_skipcleanup.teamcity
@@ -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']
diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.txt b/tests/auto/testlib/selftests/expected_skipcleanup.txt
index 987e2b9a141..c1bd95e5a9e 100644
--- a/tests/auto/testlib/selftests/expected_skipcleanup.txt
+++ b/tests/auto/testlib/selftests/expected_skipcleanup.txt
@@ -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 *********
diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.xml b/tests/auto/testlib/selftests/expected_skipcleanup.xml
index 77bf028b124..d839a69d8f9 100644
--- a/tests/auto/testlib/selftests/expected_skipcleanup.xml
+++ b/tests/auto/testlib/selftests/expected_skipcleanup.xml
@@ -10,13 +10,13 @@
-
+
+
+
-
-
-
+
diff --git a/tests/auto/testlib/selftests/expected_skipcleanuptestcase.junitxml b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.junitxml
new file mode 100644
index 00000000000..6e1e10b2b22
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.junitxml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/auto/testlib/selftests/expected_skipcleanuptestcase.lightxml b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.lightxml
new file mode 100644
index 00000000000..29fa9ff6026
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.lightxml
@@ -0,0 +1,20 @@
+
+ @INSERT_QT_VERSION_HERE@
+
+ @INSERT_QT_VERSION_HERE@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/auto/testlib/selftests/expected_skipcleanuptestcase.tap b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.tap
new file mode 100644
index 00000000000..ee3d720d228
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.tap
@@ -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
diff --git a/tests/auto/testlib/selftests/expected_skipcleanuptestcase.teamcity b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.teamcity
new file mode 100644
index 00000000000..6a7e6bc3797
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.teamcity
@@ -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']
diff --git a/tests/auto/testlib/selftests/expected_skipcleanuptestcase.txt b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.txt
new file mode 100644
index 00000000000..4dc50dca7f5
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.txt
@@ -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 *********
diff --git a/tests/auto/testlib/selftests/expected_skipcleanuptestcase.xml b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.xml
new file mode 100644
index 00000000000..442d1a69b79
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.xml
@@ -0,0 +1,23 @@
+
+
+
+ @INSERT_QT_VERSION_HERE@
+
+ @INSERT_QT_VERSION_HERE@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt b/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt
index e45d1b528bf..81997dff895 100644
--- a/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt
+++ b/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt
@@ -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
diff --git a/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp b/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp
index f0c0af75496..a93c57ccda6 100644
--- a/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp
+++ b/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp
@@ -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)
diff --git a/tests/auto/testlib/selftests/failcleanuptestcase/CMakeLists.txt b/tests/auto/testlib/selftests/failcleanuptestcase/CMakeLists.txt
new file mode 100644
index 00000000000..173d9c46c3a
--- /dev/null
+++ b/tests/auto/testlib/selftests/failcleanuptestcase/CMakeLists.txt
@@ -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)
diff --git a/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp b/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp
new file mode 100644
index 00000000000..03751225653
--- /dev/null
+++ b/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp
@@ -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
+
+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"
diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py
index b1da3fd9fa4..987a08b2c1c 100755
--- a/tests/auto/testlib/selftests/generate_expected_output.py
+++ b/tests/auto/testlib/selftests/generate_expected_output.py
@@ -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
diff --git a/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt b/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt
index 5af361e25a9..b977c2ba3ee 100644
--- a/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt
+++ b/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt
@@ -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
diff --git a/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp b/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp
index 1afe9a5c57c..568609663ab 100644
--- a/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp
+++ b/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp
@@ -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)
diff --git a/tests/auto/testlib/selftests/skipcleanuptestcase/CMakeLists.txt b/tests/auto/testlib/selftests/skipcleanuptestcase/CMakeLists.txt
new file mode 100644
index 00000000000..1d175144ff0
--- /dev/null
+++ b/tests/auto/testlib/selftests/skipcleanuptestcase/CMakeLists.txt
@@ -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)
diff --git a/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp b/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp
new file mode 100644
index 00000000000..89be7ac8bf1
--- /dev/null
+++ b/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp
@@ -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
+
+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"