diff options
author | Alex Neundorf <neundorf@kde.org> | 2023-11-30 22:14:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-01-25 17:37:56 (GMT) |
commit | dbacc1d5a8c189289fe651ed9db892d9639354c6 (patch) | |
tree | 28efd558a99a217e52309afaa5e475ab709014c3 /Tests | |
parent | 022f20f6632c934169f440271cabe8c7e52cce6e (diff) | |
download | CMake-dbacc1d5a8c189289fe651ed9db892d9639354c6.zip CMake-dbacc1d5a8c189289fe651ed9db892d9639354c6.tar.gz CMake-dbacc1d5a8c189289fe651ed9db892d9639354c6.tar.bz2 |
ctest: add command line option to exclude tests listed in a given file
Add `--exclude-from-file <filename>` to exclude the tests listed in the
given file.
Issue: #25455
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-from-file-stdout.txt | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index 96bef92..c09fff8 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -222,6 +222,7 @@ add_test(Test11 \"${CMAKE_COMMAND}\" -E echo \"test11\") run_cmake_command(TestsFromFile-${arg} ${CMAKE_CTEST_COMMAND} --${arg} ${RunCMake_SOURCE_DIR}/TestsFromFile-TestList.txt ) endfunction() run_TestsFromFileTest(tests-from-file) +run_TestsFromFileTest(exclude-from-file) function(run_SerialFailed) diff --git a/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-from-file-stdout.txt b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-from-file-stdout.txt new file mode 100644 index 0000000..96d8c3b --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/TestsFromFile-exclude-from-file-stdout.txt @@ -0,0 +1,7 @@ + +Start 2: Test2 +1/2 Test #2: Test2 ............................ Passed +[0-9.]+ sec + +Start 3: Test11 +2/2 Test #3: Test11 ........................... Passed +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 2 ++ |