diff options
Diffstat (limited to 'Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake b/Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake index 673cf57..1754203 100644 --- a/Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake @@ -19,6 +19,41 @@ run_ctest_test(setupFoo INCLUDE setupFoo) run_ctest_test(wontRun INCLUDE wontRun) run_ctest_test(unused INCLUDE Unused) +run_ctest_test(exclude_setup_foo + INCLUDE "one|two" + EXCLUDE_FIXTURE_SETUP "Foo" +) + +run_ctest_test(exclude_setup_bar + INCLUDE "one|two" + EXCLUDE_FIXTURE_SETUP "Bar" +) + +run_ctest_test(exclude_cleanup_foo + INCLUDE "one|two" + EXCLUDE_FIXTURE_CLEANUP "Foo" +) + +run_ctest_test(exclude_cleanup_bar + INCLUDE "one|two" + EXCLUDE_FIXTURE_CLEANUP "Bar" +) + +run_ctest_test(exclude_any_foo + INCLUDE "one|two" + EXCLUDE_FIXTURE "Foo" +) + +run_ctest_test(exclude_any_bar + INCLUDE "one|two" + EXCLUDE_FIXTURE "Bar" +) + +run_ctest_test(exclude_any_foobar + INCLUDE "one|two" + EXCLUDE_FIXTURE "Foo|Bar" +) + #------------------------------------------------------------ # CMake configure will fail due to cyclic test dependencies #------------------------------------------------------------ @@ -35,3 +70,18 @@ set(CASE_CMAKELISTS_CYCLIC_CODE [[ FIXTURES_REQUIRED "Foo") ]]) run_ctest(cyclicCleanup) + +#------------------------------------------------------------ +# Repeat some of the exclusion tests with ctest command line +# options instead of arguments to ctest_test(). This verifies +# that the command line options make it through as well. +#------------------------------------------------------------ +unset(CASE_CMAKELISTS_CYCLIC_CODE) +set(CASE_CTEST_FIXTURES_ARGS "") + +run_ctest(exclude_setup_foo -R "one|two" -FS Foo) +run_ctest(exclude_setup_foo -R "one|two" --fixture-exclude-setup Foo) +run_ctest(exclude_cleanup_foo -R "one|two" -FC Foo) +run_ctest(exclude_cleanup_foo -R "one|two" --fixture-exclude-cleanup Foo) +run_ctest(exclude_any_foo -R "one|two" -FA Foo) +run_ctest(exclude_any_foo -R "one|two" --fixture-exclude-any Foo) |