diff options
author | Brad King <brad.king@kitware.com> | 2017-01-17 14:04:57 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-01-17 14:04:57 (GMT) |
commit | 6e4eb083d64a0e562e4fb8d2663cd895aa75c500 (patch) | |
tree | 0cb0e34b8cf4949a4e729227058b50dd0ca91925 /Tests/RunCMake | |
parent | 65124233da4b3e53643c896d38602318fcc549f0 (diff) | |
parent | 298b5b31caaa613259d0a1c56a299e8e523fd61a (diff) | |
download | CMake-6e4eb083d64a0e562e4fb8d2663cd895aa75c500.zip CMake-6e4eb083d64a0e562e4fb8d2663cd895aa75c500.tar.gz CMake-6e4eb083d64a0e562e4fb8d2663cd895aa75c500.tar.bz2 |
Merge topic 'fixtureUnusedOrdering'
298b5b31 CTest: Ensure setup/cleanup ordering even when fixture not required
Diffstat (limited to 'Tests/RunCMake')
-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$ |