summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2023-11-30 22:14:46 (GMT)
committerBrad King <brad.king@kitware.com>2024-01-25 17:37:56 (GMT)
commitdbacc1d5a8c189289fe651ed9db892d9639354c6 (patch)
tree28efd558a99a217e52309afaa5e475ab709014c3 /Source/cmCTest.cxx
parent022f20f6632c934169f440271cabe8c7e52cce6e (diff)
downloadCMake-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 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index a333c44..7acee4b 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -2231,6 +2231,15 @@ bool cmCTest::HandleCommandLineArguments(size_t& i,
this->GetMemCheckHandler()->SetPersistentOption("TestListFile", args[i]);
}
+ else if (this->CheckArgument(arg, "--exclude-from-file"_s) &&
+ i < args.size() - 1) {
+ i++;
+ this->GetTestHandler()->SetPersistentOption("ExcludeTestListFile",
+ args[i]);
+ this->GetMemCheckHandler()->SetPersistentOption("ExcludeTestListFile",
+ args[i]);
+ }
+
else if (this->CheckArgument(arg, "--rerun-failed"_s)) {
this->GetTestHandler()->SetPersistentOption("RerunFailed", "true");
this->GetMemCheckHandler()->SetPersistentOption("RerunFailed", "true");