From 3a5f86d78452714f2a57772f33f8e6c6b49b6f22 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 6 Aug 2018 17:07:07 +0200 Subject: [PATCH] Add a feature to enable CodeCoverage analysis of testlib Based on Asmo Saarela's advice (QTPM-686), adapted on advice from FrogLogic support and converted to a feature so that the selftest and testlib qmake config can be co-ordinated. Task-number: QTPM-1385 Change-Id: Icd706f086009e1e08b3f8c5cd553f792402e28c0 Reviewed-by: Volker Hilsheimer --- src/testlib/configure.json | 6 ++++ src/testlib/qtest.h | 25 +++++++++++++++++ src/testlib/qtestcase.cpp | 2 +- src/testlib/qtestlog.cpp | 5 ++++ src/testlib/selfcover.pri | 28 +++++++++++++++++++ src/testlib/testlib.pro | 1 + .../qabstractitemmodeltester.pro | 2 ++ tests/auto/testlib/qsignalspy/qsignalspy.pro | 2 ++ tests/auto/testlib/selftests/alive/alive.pro | 2 ++ .../auto/testlib/selftests/assert/assert.pro | 2 ++ .../auto/testlib/selftests/badxml/badxml.pro | 2 ++ .../benchlibcallgrind/benchlibcallgrind.pro | 2 ++ .../benchlibcounting/benchlibcounting.pro | 2 ++ .../benchlibeventcounter.pro | 2 ++ .../benchliboptions/benchliboptions.pro | 2 ++ .../benchlibtickcounter.pro | 2 ++ .../benchlibwalltime/benchlibwalltime.pro | 2 ++ .../selftests/blacklisted/blacklisted.pro | 2 ++ .../testlib/selftests/cmptest/cmptest.pro | 2 ++ .../commandlinedata/commandlinedata.pro | 2 ++ .../testlib/selftests/counting/counting.pro | 2 ++ .../testlib/selftests/crashes/crashes.pro | 2 ++ .../testlib/selftests/datatable/datatable.pro | 2 ++ .../testlib/selftests/datetime/datetime.pro | 2 ++ .../selftests/deleteLater/deleteLater.pro | 2 ++ .../deleteLater_noApp/deleteLater_noApp.pro | 2 ++ .../selftests/differentexec/differentexec.pro | 2 ++ .../exceptionthrow/exceptionthrow.pro | 2 ++ .../selftests/expectfail/expectfail.pro | 2 ++ .../selftests/failcleanup/failcleanup.pro | 2 ++ .../testlib/selftests/failinit/failinit.pro | 2 ++ .../selftests/failinitdata/failinitdata.pro | 2 ++ .../selftests/fetchbogus/fetchbogus.pro | 2 ++ .../selftests/findtestdata/findtestdata.pro | 2 ++ tests/auto/testlib/selftests/float/float.pro | 2 ++ .../selftests/globaldata/globaldata.pro | 2 ++ .../testlib/selftests/keyboard/keyboard.pro | 2 ++ .../selftests/longstring/longstring.pro | 2 ++ .../selftests/maxwarnings/maxwarnings.pro | 2 ++ tests/auto/testlib/selftests/mouse/mouse.pro | 2 ++ .../testlib/selftests/multiexec/multiexec.pro | 2 ++ .../pairdiagnostics/pairdiagnostics.pro | 2 ++ .../selftests/printdatatags/printdatatags.pro | 2 ++ .../printdatatagswithglobaltags.pro | 2 ++ .../qexecstringlist/qexecstringlist.pro | 2 ++ .../auto/testlib/selftests/silent/silent.pro | 2 ++ .../selftests/singleskip/singleskip.pro | 2 ++ tests/auto/testlib/selftests/skip/skip.pro | 2 ++ .../selftests/skipcleanup/skipcleanup.pro | 2 ++ .../testlib/selftests/skipinit/skipinit.pro | 2 ++ .../selftests/skipinitdata/skipinitdata.pro | 2 ++ tests/auto/testlib/selftests/sleep/sleep.pro | 2 ++ .../auto/testlib/selftests/strcmp/strcmp.pro | 2 ++ .../testlib/selftests/subtest/subtest.pro | 2 ++ tests/auto/testlib/selftests/test/test.pro | 1 + .../testlib/selftests/testlib/testlib.pro | 2 ++ .../tuplediagnostics/tuplediagnostics.pro | 2 ++ .../testlib/selftests/verbose1/verbose1.pro | 2 ++ .../testlib/selftests/verbose2/verbose2.pro | 2 ++ .../verifyexceptionthrown.pro | 2 ++ .../testlib/selftests/warnings/warnings.pro | 2 ++ tests/auto/testlib/selftests/xunit/xunit.pro | 2 ++ 62 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 src/testlib/selfcover.pri diff --git a/src/testlib/configure.json b/src/testlib/configure.json index c4640372053..df6132cdc2e 100644 --- a/src/testlib/configure.json +++ b/src/testlib/configure.json @@ -5,6 +5,12 @@ ], "features": { + "testlib_selfcover": { + "label": "Coverage testing of testlib itself", + "purpose": "Gauges how thoroughly testlib's selftest exercises testlib's code", + "autoDetect": false, + "output": [ "publicFeature" ] + }, "itemmodeltester": { "label": "Tester for item models", "purpose": "Provides a utility to test item models.", diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h index 3906eddb79e..ebd94939ce2 100644 --- a/src/testlib/qtest.h +++ b/src/testlib/qtest.h @@ -374,9 +374,30 @@ QT_END_NAMESPACE # define QTEST_SET_MAIN_SOURCE_PATH QTest::setMainSourcePath(__FILE__); #endif +// Hooks for coverage-testing of QTestLib itself: +#if QT_CONFIG(testlib_selfcover) && defined(__COVERAGESCANNER__) +struct QtCoverageScanner +{ + QtCoverageScanner(const char *name) + { + __coveragescanner_clear(); + __coveragescanner_testname(name); + } + ~QtCoverageScanner() + { + __coveragescanner_save(); + __coveragescanner_testname(""); + } +}; +#define TESTLIB_SELFCOVERAGE_START(name) QtCoverageScanner _qtCoverageScanner(name); +#else +#define TESTLIB_SELFCOVERAGE_START(name) +#endif + #define QTEST_APPLESS_MAIN(TestObject) \ int main(int argc, char *argv[]) \ { \ + TESTLIB_SELFCOVERAGE_START(TestObject) \ TestObject tc; \ QTEST_SET_MAIN_SOURCE_PATH \ return QTest::qExec(&tc, argc, argv); \ @@ -406,6 +427,7 @@ int main(int argc, char *argv[]) \ #define QTEST_MAIN(TestObject) \ int main(int argc, char *argv[]) \ { \ + TESTLIB_SELFCOVERAGE_START(#TestObject) \ QApplication app(argc, argv); \ app.setAttribute(Qt::AA_Use96Dpi, true); \ QTEST_DISABLE_KEYPAD_NAVIGATION \ @@ -421,6 +443,7 @@ int main(int argc, char *argv[]) \ #define QTEST_MAIN(TestObject) \ int main(int argc, char *argv[]) \ { \ + TESTLIB_SELFCOVERAGE_START(#TestObject) \ QGuiApplication app(argc, argv); \ app.setAttribute(Qt::AA_Use96Dpi, true); \ TestObject tc; \ @@ -433,6 +456,7 @@ int main(int argc, char *argv[]) \ #define QTEST_MAIN(TestObject) \ int main(int argc, char *argv[]) \ { \ + TESTLIB_SELFCOVERAGE_START(#TestObject) \ QCoreApplication app(argc, argv); \ app.setAttribute(Qt::AA_Use96Dpi, true); \ TestObject tc; \ @@ -445,6 +469,7 @@ int main(int argc, char *argv[]) \ #define QTEST_GUILESS_MAIN(TestObject) \ int main(int argc, char *argv[]) \ { \ + TESTLIB_SELFCOVERAGE_START(#TestObject) \ QCoreApplication app(argc, argv); \ app.setAttribute(Qt::AA_Use96Dpi, true); \ TestObject tc; \ diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 9f0cdb0109e..15e123bdb78 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -246,7 +246,7 @@ static void stackTrace() static bool installCoverageTool(const char * appname, const char * testname) { -#ifdef __COVERAGESCANNER__ +#if defined(__COVERAGESCANNER__) && !QT_CONFIG(testlib_selfcover) if (!qEnvironmentVariableIsEmpty("QT_TESTCOCOON_ACTIVE")) return false; // Set environment variable QT_TESTCOCOON_ACTIVE to prevent an eventual subtest from diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp index 1268730cc69..e7150260e5c 100644 --- a/src/testlib/qtestlog.cpp +++ b/src/testlib/qtestlog.cpp @@ -73,6 +73,10 @@ QT_BEGIN_NAMESPACE static void saveCoverageTool(const char * appname, bool testfailed, bool installedTestCoverage) { #ifdef __COVERAGESCANNER__ +# if QT_CONFIG(testlib_selfcover) + __coveragescanner_teststate(QTestLog::failCount() > 0 ? "FAILED" : + QTestLog::passCount() > 0 ? "PASSED" : "SKIPPED"); +# else if (!installedTestCoverage) return; // install again to make sure the filename is correct. @@ -83,6 +87,7 @@ static void saveCoverageTool(const char * appname, bool testfailed, bool install __coveragescanner_testname(""); __coveragescanner_clear(); unsetenv("QT_TESTCOCOON_ACTIVE"); +# endif // testlib_selfcover #else Q_UNUSED(appname); Q_UNUSED(testfailed); diff --git a/src/testlib/selfcover.pri b/src/testlib/selfcover.pri new file mode 100644 index 00000000000..7de50ba6e6a --- /dev/null +++ b/src/testlib/selfcover.pri @@ -0,0 +1,28 @@ +# Configuration for testlib and its tests, to instrument with +# FrogLogic's Squish CoCo (cf. testcocoon.prf, which handles similar +# for general code; but testlib needs special handling). + +# Only for use when feature testlib_selfcover is enabled: +!qtConfig(testlib_selfcover): return() + +# This enables verification that testlib itself is adequately tested, +# as a grounds for trusting that testing with it is useful. +# Exclude all non-testlib source from coverage instrumentation: +COVERAGE_OPTIONS = --cs-exclude-file-abs-wildcard=$$QT_SOURCE_TREE/* +COVERAGE_OPTIONS += --cs-include-file-abs-wildcard=*/src/testlib/* +COVERAGE_OPTIONS += --cs-mcc # enable Multiple Condition Coverage +COVERAGE_OPTIONS += --cs-mcdc # enable Multiple Condition / Decision Coverage +# (recommended for ISO 26262 ASIL A, B and C -- highly recommended for ASIL D) +# https://doc.froglogic.com/squish-coco/4.1/codecoverage.html#sec%3Amcdc + +QMAKE_CFLAGS += $$COVERAGE_OPTIONS +QMAKE_CXXFLAGS += $$COVERAGE_OPTIONS +QMAKE_LFLAGS += $$COVERAGE_OPTIONS + +# FIXME: relies on QMAKE_* being just the command-names, with no path prefix +QMAKE_CC = cs$$QMAKE_CC +QMAKE_CXX = cs$$QMAKE_CXX +QMAKE_LINK = cs$$QMAKE_LINK +QMAKE_LINK_SHLIB = cs$$QMAKE_LINK_SHLIB +QMAKE_AR = cs$$QMAKE_AR +QMAKE_LIB = cs$$QMAKE_LIB diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro index 34bb581e026..f52a913a087 100644 --- a/src/testlib/testlib.pro +++ b/src/testlib/testlib.pro @@ -146,4 +146,5 @@ mac { !qtHaveModule(network): HEADERSCLEAN_EXCLUDE += qtest_network.h +include(selfcover.pri) load(qt_module) diff --git a/tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro b/tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro index 306e8089f38..1aefc544d10 100644 --- a/tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro +++ b/tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro @@ -11,3 +11,5 @@ SOURCES += \ HEADERS += \ $${mtdir}/dynamictreemodel.h + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/qsignalspy/qsignalspy.pro b/tests/auto/testlib/qsignalspy/qsignalspy.pro index 1578802bf87..5343a98c141 100644 --- a/tests/auto/testlib/qsignalspy/qsignalspy.pro +++ b/tests/auto/testlib/qsignalspy/qsignalspy.pro @@ -2,3 +2,5 @@ CONFIG += testcase TARGET = tst_qsignalspy SOURCES += tst_qsignalspy.cpp QT = core testlib + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/alive/alive.pro b/tests/auto/testlib/selftests/alive/alive.pro index d3df09b10dd..bda0db2282e 100644 --- a/tests/auto/testlib/selftests/alive/alive.pro +++ b/tests/auto/testlib/selftests/alive/alive.pro @@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target TARGET = alive + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/assert/assert.pro b/tests/auto/testlib/selftests/assert/assert.pro index cfc6a0c6b32..0692b6bdf26 100644 --- a/tests/auto/testlib/selftests/assert/assert.pro +++ b/tests/auto/testlib/selftests/assert/assert.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = assert + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/badxml/badxml.pro b/tests/auto/testlib/selftests/badxml/badxml.pro index 7b3b0f701ca..4e15886504b 100644 --- a/tests/auto/testlib/selftests/badxml/badxml.pro +++ b/tests/auto/testlib/selftests/badxml/badxml.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = badxml + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro b/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro index 6cbefe518c5..12f068843e2 100644 --- a/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro +++ b/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = benchlibcallgrind + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro b/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro index b495995eac3..786511d057d 100644 --- a/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro +++ b/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = benchlibcounting + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro b/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro index 5e2b963491f..98fa0e45678 100644 --- a/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro +++ b/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = benchlibeventcounter + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro b/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro index f4bcc921298..0b627ecb10d 100644 --- a/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro +++ b/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = benchliboptions + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro b/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro index ce0ec7012cb..f0741d5c263 100644 --- a/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro +++ b/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro @@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target TARGET = benchlibtickcounter + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro b/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro index 0e689871ab3..80d97a24222 100644 --- a/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro +++ b/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro @@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target TARGET = benchlibwalltime + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/blacklisted/blacklisted.pro b/tests/auto/testlib/selftests/blacklisted/blacklisted.pro index 5bd22910b14..a8602ee2662 100644 --- a/tests/auto/testlib/selftests/blacklisted/blacklisted.pro +++ b/tests/auto/testlib/selftests/blacklisted/blacklisted.pro @@ -5,3 +5,5 @@ mac: CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = blacklisted + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/cmptest/cmptest.pro b/tests/auto/testlib/selftests/cmptest/cmptest.pro index 2d5dd071a92..f38f5ecce16 100644 --- a/tests/auto/testlib/selftests/cmptest/cmptest.pro +++ b/tests/auto/testlib/selftests/cmptest/cmptest.pro @@ -6,3 +6,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = cmptest + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro b/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro index 056388333ad..8032ba5a022 100644 --- a/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro +++ b/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = commandlinedata + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/counting/counting.pro b/tests/auto/testlib/selftests/counting/counting.pro index 8aa2fe5753f..be3a5339b0b 100644 --- a/tests/auto/testlib/selftests/counting/counting.pro +++ b/tests/auto/testlib/selftests/counting/counting.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = counting + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/crashes/crashes.pro b/tests/auto/testlib/selftests/crashes/crashes.pro index 25e24243d1e..00fa07a4157 100644 --- a/tests/auto/testlib/selftests/crashes/crashes.pro +++ b/tests/auto/testlib/selftests/crashes/crashes.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = crashes + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/datatable/datatable.pro b/tests/auto/testlib/selftests/datatable/datatable.pro index 72fa851ae6e..12a1f697b1f 100644 --- a/tests/auto/testlib/selftests/datatable/datatable.pro +++ b/tests/auto/testlib/selftests/datatable/datatable.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = datatable + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/datetime/datetime.pro b/tests/auto/testlib/selftests/datetime/datetime.pro index d65c59354fd..15242810904 100644 --- a/tests/auto/testlib/selftests/datetime/datetime.pro +++ b/tests/auto/testlib/selftests/datetime/datetime.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = datetime + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/deleteLater/deleteLater.pro b/tests/auto/testlib/selftests/deleteLater/deleteLater.pro index 6847238b1d5..9a100964614 100644 --- a/tests/auto/testlib/selftests/deleteLater/deleteLater.pro +++ b/tests/auto/testlib/selftests/deleteLater/deleteLater.pro @@ -5,3 +5,5 @@ CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = tst_deleteLater + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro b/tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro index f860a767cde..6f2b253c14a 100644 --- a/tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro +++ b/tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro @@ -5,3 +5,5 @@ CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = tst_deleteLater_noApp + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/differentexec/differentexec.pro b/tests/auto/testlib/selftests/differentexec/differentexec.pro index 7f148ba996e..339962f6093 100644 --- a/tests/auto/testlib/selftests/differentexec/differentexec.pro +++ b/tests/auto/testlib/selftests/differentexec/differentexec.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = differentexec + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro b/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro index fe89f6f3cd0..5473ec32c3b 100644 --- a/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro +++ b/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro @@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target CONFIG += exceptions TARGET = exceptionthrow + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/expectfail/expectfail.pro b/tests/auto/testlib/selftests/expectfail/expectfail.pro index c1849990f2c..db383bee6ac 100644 --- a/tests/auto/testlib/selftests/expectfail/expectfail.pro +++ b/tests/auto/testlib/selftests/expectfail/expectfail.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = expectfail + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/failcleanup/failcleanup.pro b/tests/auto/testlib/selftests/failcleanup/failcleanup.pro index 426d7cc45b7..12da5920fb5 100644 --- a/tests/auto/testlib/selftests/failcleanup/failcleanup.pro +++ b/tests/auto/testlib/selftests/failcleanup/failcleanup.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = failcleanup + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/failinit/failinit.pro b/tests/auto/testlib/selftests/failinit/failinit.pro index 6a30a5af68f..46b1c3a6c49 100644 --- a/tests/auto/testlib/selftests/failinit/failinit.pro +++ b/tests/auto/testlib/selftests/failinit/failinit.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = failinit + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/failinitdata/failinitdata.pro b/tests/auto/testlib/selftests/failinitdata/failinitdata.pro index b608c67dbb3..63b32cb6d6e 100644 --- a/tests/auto/testlib/selftests/failinitdata/failinitdata.pro +++ b/tests/auto/testlib/selftests/failinitdata/failinitdata.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = failinitdata + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro b/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro index 33b306ca75f..0fbb5e4c009 100644 --- a/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro +++ b/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = fetchbogus + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/findtestdata/findtestdata.pro b/tests/auto/testlib/selftests/findtestdata/findtestdata.pro index f04a640c595..7fbdaea3a3a 100644 --- a/tests/auto/testlib/selftests/findtestdata/findtestdata.pro +++ b/tests/auto/testlib/selftests/findtestdata/findtestdata.pro @@ -7,3 +7,5 @@ CONFIG -= debug_and_release_target RESOURCES = findtestdata.qrc TARGET = findtestdata + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/float/float.pro b/tests/auto/testlib/selftests/float/float.pro index 95980eeac87..479eb152c51 100644 --- a/tests/auto/testlib/selftests/float/float.pro +++ b/tests/auto/testlib/selftests/float/float.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = float + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/globaldata/globaldata.pro b/tests/auto/testlib/selftests/globaldata/globaldata.pro index c0b1554c0fa..621416c5b8b 100644 --- a/tests/auto/testlib/selftests/globaldata/globaldata.pro +++ b/tests/auto/testlib/selftests/globaldata/globaldata.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = globaldata + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/keyboard/keyboard.pro b/tests/auto/testlib/selftests/keyboard/keyboard.pro index 0097318797f..488c992e628 100644 --- a/tests/auto/testlib/selftests/keyboard/keyboard.pro +++ b/tests/auto/testlib/selftests/keyboard/keyboard.pro @@ -5,3 +5,5 @@ macos:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = keyboard + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/longstring/longstring.pro b/tests/auto/testlib/selftests/longstring/longstring.pro index d16ba85095d..d8961203f30 100644 --- a/tests/auto/testlib/selftests/longstring/longstring.pro +++ b/tests/auto/testlib/selftests/longstring/longstring.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = longstring + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro index 79451af1ec4..bdca0225d32 100644 --- a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro +++ b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = maxwarnings + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/mouse/mouse.pro b/tests/auto/testlib/selftests/mouse/mouse.pro index 7c06b8aa64d..e5701eee0f8 100644 --- a/tests/auto/testlib/selftests/mouse/mouse.pro +++ b/tests/auto/testlib/selftests/mouse/mouse.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = mouse + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/multiexec/multiexec.pro b/tests/auto/testlib/selftests/multiexec/multiexec.pro index 2038acbd313..e9b2b7b587b 100644 --- a/tests/auto/testlib/selftests/multiexec/multiexec.pro +++ b/tests/auto/testlib/selftests/multiexec/multiexec.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = multiexec + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro b/tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro index 1c07c93e9d4..25f5bfe809c 100644 --- a/tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro +++ b/tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro @@ -4,3 +4,5 @@ QT = core testlib CONFIG -= app_bundle debug_and_release_target TARGET = pairdiagnostics + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/printdatatags/printdatatags.pro b/tests/auto/testlib/selftests/printdatatags/printdatatags.pro index cd06384835a..83f171aac59 100644 --- a/tests/auto/testlib/selftests/printdatatags/printdatatags.pro +++ b/tests/auto/testlib/selftests/printdatatags/printdatatags.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = printdatatags + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro b/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro index f1cf25d1042..00ca4a0e62e 100644 --- a/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro +++ b/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = printdatatagswithglobaltags + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro b/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro index bd967f32e6c..4d7af8ab40b 100644 --- a/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro +++ b/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = qexecstringlist + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/silent/silent.pro b/tests/auto/testlib/selftests/silent/silent.pro index 3150f65a5e4..3f6325a0107 100644 --- a/tests/auto/testlib/selftests/silent/silent.pro +++ b/tests/auto/testlib/selftests/silent/silent.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = silent + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/singleskip/singleskip.pro b/tests/auto/testlib/selftests/singleskip/singleskip.pro index 9f63e62747a..a32c22c9432 100644 --- a/tests/auto/testlib/selftests/singleskip/singleskip.pro +++ b/tests/auto/testlib/selftests/singleskip/singleskip.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = singleskip + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/skip/skip.pro b/tests/auto/testlib/selftests/skip/skip.pro index 8780d295cf6..19a01908af8 100644 --- a/tests/auto/testlib/selftests/skip/skip.pro +++ b/tests/auto/testlib/selftests/skip/skip.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = skip + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro b/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro index f98cda7596a..059132b5a6e 100644 --- a/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro +++ b/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = skipcleanup + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/skipinit/skipinit.pro b/tests/auto/testlib/selftests/skipinit/skipinit.pro index 7defce9a520..66052269932 100644 --- a/tests/auto/testlib/selftests/skipinit/skipinit.pro +++ b/tests/auto/testlib/selftests/skipinit/skipinit.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = skipinit + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro b/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro index cd806c2a439..176955500be 100644 --- a/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro +++ b/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = skipinitdata + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/sleep/sleep.pro b/tests/auto/testlib/selftests/sleep/sleep.pro index affcba22eef..b109bf6253b 100644 --- a/tests/auto/testlib/selftests/sleep/sleep.pro +++ b/tests/auto/testlib/selftests/sleep/sleep.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = sleep + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/strcmp/strcmp.pro b/tests/auto/testlib/selftests/strcmp/strcmp.pro index f5f6eecc883..35a4c5e8586 100644 --- a/tests/auto/testlib/selftests/strcmp/strcmp.pro +++ b/tests/auto/testlib/selftests/strcmp/strcmp.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = strcmp + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/subtest/subtest.pro b/tests/auto/testlib/selftests/subtest/subtest.pro index 09dee1b1b9c..b5c294aed6b 100644 --- a/tests/auto/testlib/selftests/subtest/subtest.pro +++ b/tests/auto/testlib/selftests/subtest/subtest.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = subtest + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/test/test.pro b/tests/auto/testlib/selftests/test/test.pro index ec1633ebff4..fce8e48ca27 100644 --- a/tests/auto/testlib/selftests/test/test.pro +++ b/tests/auto/testlib/selftests/test/test.pro @@ -19,3 +19,4 @@ RESOURCES += expected_files include(../selftests.pri) !android:!winrt: for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}" +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/testlib/testlib.pro b/tests/auto/testlib/selftests/testlib/testlib.pro index a909c1c2132..8798f86b18a 100644 --- a/tests/auto/testlib/selftests/testlib/testlib.pro +++ b/tests/auto/testlib/selftests/testlib/testlib.pro @@ -5,3 +5,5 @@ darwin: CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = testlib + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro b/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro index 7a29e0e5e17..f338170b817 100644 --- a/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro +++ b/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro @@ -4,3 +4,5 @@ QT = core testlib CONFIG -= app_bundle debug_and_release_target TARGET = tuplediagnostics + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/verbose1/verbose1.pro b/tests/auto/testlib/selftests/verbose1/verbose1.pro index f00ae69d172..1f16d70d66a 100644 --- a/tests/auto/testlib/selftests/verbose1/verbose1.pro +++ b/tests/auto/testlib/selftests/verbose1/verbose1.pro @@ -8,3 +8,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = verbose1 + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/verbose2/verbose2.pro b/tests/auto/testlib/selftests/verbose2/verbose2.pro index 796cdeb975a..bf549044884 100644 --- a/tests/auto/testlib/selftests/verbose2/verbose2.pro +++ b/tests/auto/testlib/selftests/verbose2/verbose2.pro @@ -8,3 +8,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = verbose2 + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro b/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro index 51f108c9d7f..198d35dc6c6 100644 --- a/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro +++ b/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro @@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target CONFIG += exceptions TARGET = verifyexceptionthrown + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/warnings/warnings.pro b/tests/auto/testlib/selftests/warnings/warnings.pro index 0c6cddcefb2..a0bd2c62ba0 100644 --- a/tests/auto/testlib/selftests/warnings/warnings.pro +++ b/tests/auto/testlib/selftests/warnings/warnings.pro @@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = warnings + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/xunit/xunit.pro b/tests/auto/testlib/selftests/xunit/xunit.pro index b8c606e8284..becb46ce8b0 100644 --- a/tests/auto/testlib/selftests/xunit/xunit.pro +++ b/tests/auto/testlib/selftests/xunit/xunit.pro @@ -6,3 +6,5 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = xunit + +include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)