Changeset View
Changeset View
Standalone View
Standalone View
src/tests/CMakeLists.txt
1 | set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) | 1 | set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | find_package(Qt5Test CONFIG REQUIRED) | 3 | find_package(Qt5Test CONFIG REQUIRED) | ||
4 | include(ECMAddTests) | 4 | include(ECMAddTests) | ||
5 | 5 | | |||
6 | include(FindGem) | ||||
7 | | ||||
8 | find_gem(test-unit REQUIRED) | ||||
elvisangelaccio: Why REQUIRED? This gem is only needed for the test, right?
Would it make sense to make it… | |||||
My thinking is that its part of the test suite, so unless you build with BUILD_TESTING=OFF you must have the test run when you ctest the project. It also prevents accidentally not running the tests on CI (missing dep, broken ruby etc.). sitter: My thinking is that its part of the test suite, so unless you build with BUILD_TESTING=OFF you… | |||||
elvisangelaccio: Good point. Go for it :) | |||||
9 | set_package_properties(Gem:test-unit PROPERTIES | ||||
10 | DESCRIPTION "Ruby gem 'test-unit' required for testing of servicemenu helpers.") | ||||
11 | | ||||
12 | if(BUILD_COVERAGE) | ||||
13 | find_gem(simplecov) | ||||
14 | set_package_properties(Gem:simplecov PROPERTIES | ||||
15 | DESCRIPTION "Ruby gem 'simplecov' used for coverage statistics.") | ||||
16 | endif() | ||||
17 | | ||||
6 | # KItemSetTest | 18 | # KItemSetTest | ||
7 | ecm_add_test(kitemsettest.cpp LINK_LIBRARIES dolphinprivate Qt5::Test) | 19 | ecm_add_test(kitemsettest.cpp LINK_LIBRARIES dolphinprivate Qt5::Test) | ||
8 | 20 | | |||
9 | # KItemRangeTest | 21 | # KItemRangeTest | ||
10 | ecm_add_test(kitemrangetest.cpp LINK_LIBRARIES dolphinprivate Qt5::Test) | 22 | ecm_add_test(kitemrangetest.cpp LINK_LIBRARIES dolphinprivate Qt5::Test) | ||
11 | 23 | | |||
12 | 24 | | |||
13 | # KItemListSelectionManagerTest | 25 | # KItemListSelectionManagerTest | ||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |
Why REQUIRED? This gem is only needed for the test, right?
Would it make sense to make it optional and only run the test if the gem is found?