diff options
author | Craig Scott <craig.scott@crascit.com> | 2017-01-15 02:06:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-01-16 16:29:24 (GMT) |
commit | 298b5b31caaa613259d0a1c56a299e8e523fd61a (patch) | |
tree | 5549a48fdda0653fb198ee59550a3a665e9a85b1 /Tests | |
parent | 85a8939e2fc7eb2715a9264fd40c009c3a98cb8b (diff) | |
download | CMake-298b5b31caaa613259d0a1c56a299e8e523fd61a.zip CMake-298b5b31caaa613259d0a1c56a299e8e523fd61a.tar.gz CMake-298b5b31caaa613259d0a1c56a299e8e523fd61a.tar.bz2 |
CTest: Ensure setup/cleanup ordering even when fixture not required
Closes: #16558
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in | 6 | ||||
-rw-r--r-- | Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/ctest_fixtures/unused-stdout.txt | 9 |
3 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in b/Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in index ba1c77a..ab50fdd 100644 --- a/Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in @@ -30,6 +30,8 @@ failTest(setupFails) # 9 passTest(wontRun) # 10 passTest(cyclicSetup) # 11 passTest(cyclicCleanup) # 12 +passTest(cleanupUnused) # 13 +passTest(setupUnused) # 14 # Define fixture dependencies and ordering set_tests_properties(setupFoo PROPERTIES FIXTURES_SETUP "Foo") @@ -50,6 +52,9 @@ set_tests_properties(two PROPERTIES FIXTURES_REQUIRED "Bar") set_tests_properties(three PROPERTIES FIXTURES_REQUIRED "Meta;Bar") set_tests_properties(wontRun PROPERTIES FIXTURES_REQUIRED "Fails") +set_tests_properties(cleanupUnused PROPERTIES FIXTURES_CLEANUP "Unused") +set_tests_properties(setupUnused PROPERTIES FIXTURES_SETUP "Unused") + @CASE_CMAKELISTS_CYCLIC_CODE@ # These are the cases verified by the main cmake build @@ -62,6 +67,7 @@ set_tests_properties(wontRun PROPERTIES FIXTURES_REQUIRED "Fails") # wontRun 9, 10 # cyclicSetup -NA- (configure fails) # cyclicCleanup -NA- (configure fails) +# unused 14, 13 # # In the case of asking for just setupFoo, since there are # no tests using the Foo fixture, we do NOT expect cleanupFoo diff --git a/Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake b/Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake index f13289a..673cf57 100644 --- a/Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake @@ -17,6 +17,7 @@ run_ctest_test(two INCLUDE two) run_ctest_test(three INCLUDE three) run_ctest_test(setupFoo INCLUDE setupFoo) run_ctest_test(wontRun INCLUDE wontRun) +run_ctest_test(unused INCLUDE Unused) #------------------------------------------------------------ # CMake configure will fail due to cyclic test dependencies diff --git a/Tests/RunCMake/ctest_fixtures/unused-stdout.txt b/Tests/RunCMake/ctest_fixtures/unused-stdout.txt new file mode 100644 index 0000000..b04a621 --- /dev/null +++ b/Tests/RunCMake/ctest_fixtures/unused-stdout.txt @@ -0,0 +1,9 @@ +Test project .*/Tests/RunCMake/ctest_fixtures/unused-build + Start 14: setupUnused +1/2 Test #14: setupUnused +\.+ +Passed +[0-9.]+ sec + Start 13: cleanupUnused +2/2 Test #13: cleanupUnused +\.+ +Passed +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 2 ++ +Total Test time \(real\) = +[0-9.]+ sec$ |