diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2020-03-17 11:15:10 +0100 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2020-03-18 16:28:30 +0100 |
commit | dfd37e27caca37594d43c3b096f711e830c2733d (patch) | |
tree | a37f1fe5e922233869d613b1221b0e9dfb53739b /tests/auto/testlib/selftests/test/CMakeLists.txt | |
parent | 64bda9d91588c9d8d22a16a41c28d845ab6a935e (diff) |
CMake: Enable testlib selftests
This patch adds the equivalent of testlib's selfcover.pri and is enabled
for both testlib and the respective selftests test.
This patch also fixes the selftests so that they can run without
FEATURE_testlib_selfcover enabled.
Change-Id: I15913de2d572ac79804ce3e652cee66de74318f8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/auto/testlib/selftests/test/CMakeLists.txt')
-rw-r--r-- | tests/auto/testlib/selftests/test/CMakeLists.txt | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/test/CMakeLists.txt b/tests/auto/testlib/selftests/test/CMakeLists.txt new file mode 100644 index 0000000000..ef7157a247 --- /dev/null +++ b/tests/auto/testlib/selftests/test/CMakeLists.txt @@ -0,0 +1,61 @@ +# Generated from test.pro. + +##################################################################### +## tst_selftests Test: +##################################################################### + +qt_add_test(tst_selftests + GUI + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" + SOURCES + ../../../../shared/emulationdetector.h + ../tst_selftests.cpp + INCLUDE_DIRECTORIES + ../../../../shared + PUBLIC_LIBRARIES + Qt::TestPrivate + # special case begin + # These lines need to be commented out as they need to be enabled + # COMPILE_OPTIONS + # conditionally + # --cs-exclude-file-abs-wildcard=${QT_SOURCE_TREE}/* + # --cs-include-file-abs-wildcard=*/src/testlib/* + # --cs-mcc + # --cs-mcdc + # LINK_OPTIONS + # "$$COVERAGE_OPTIONS" + # special case end +) + +file(GLOB resource_glob_0 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "../expected_*") +foreach(file IN LISTS resource_glob_0) + set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/${file}" PROPERTIES QT_RESOURCE_ALIAS "${file}") +endforeach() + +# Resources: +set(qmake_expected_files_resource_files + ${resource_glob_0} +) + +qt_add_resource(tst_selftests "qmake_expected_files" + PREFIX + "/" + BASE + "${CMAKE_CURRENT_SOURCE_DIR}" # special case + FILES + ${qmake_expected_files_resource_files} +) + + +## Scopes: +##################################################################### + +#### Keys ignored in scope 5:.:.:test.pro:NOT ANDROID AND NOT WINRT AND for(file,SUBPROGRAMS): +# TEST_HELPER_INSTALLS = "../$${file}/$${file}" + +#### Keys ignored in scope 7:.:..:../selftests.pri:TARGET Qt::Gui: +# SUBPROGRAMS = "keyboard" "mouse" + +# special case begin +qt_apply_testlib_coverage_options(tst_selftests) +# special case end |