summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2017-04-22 09:38:55 (GMT)
committerCraig Scott <craig.scott@crascit.com>2017-05-01 15:54:13 (GMT)
commitc1b2b7c03c899c9b066840600ec15b16ae2fa9ac (patch)
tree588318387fddce99535d6f90637cfd670e2a24b8 /Source/cmCTest.cxx
parent02d11868827417e88cbbee795703421dfdb342f6 (diff)
downloadCMake-c1b2b7c03c899c9b066840600ec15b16ae2fa9ac.zip
CMake-c1b2b7c03c899c9b066840600ec15b16ae2fa9ac.tar.gz
CMake-c1b2b7c03c899c9b066840600ec15b16ae2fa9ac.tar.bz2
Add ctest options for limiting which tests fixtures add
The new options allow the user to restrict the setup and cleanup tests automatically added for fixtures.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 46fa86e..010221e 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1899,6 +1899,34 @@ bool cmCTest::HandleCommandLineArguments(size_t& i,
->SetPersistentOption("ExcludeRegularExpression", args[i].c_str());
}
+ if (this->CheckArgument(arg, "-FA", "--fixture-exclude-any") &&
+ i < args.size() - 1) {
+ i++;
+ this->GetHandler("test")->SetPersistentOption(
+ "ExcludeFixtureRegularExpression", args[i].c_str());
+ this->GetHandler("memcheck")
+ ->SetPersistentOption("ExcludeFixtureRegularExpression",
+ args[i].c_str());
+ }
+ if (this->CheckArgument(arg, "-FS", "--fixture-exclude-setup") &&
+ i < args.size() - 1) {
+ i++;
+ this->GetHandler("test")->SetPersistentOption(
+ "ExcludeFixtureSetupRegularExpression", args[i].c_str());
+ this->GetHandler("memcheck")
+ ->SetPersistentOption("ExcludeFixtureSetupRegularExpression",
+ args[i].c_str());
+ }
+ if (this->CheckArgument(arg, "-FC", "--fixture-exclude-cleanup") &&
+ i < args.size() - 1) {
+ i++;
+ this->GetHandler("test")->SetPersistentOption(
+ "ExcludeFixtureCleanupRegularExpression", args[i].c_str());
+ this->GetHandler("memcheck")
+ ->SetPersistentOption("ExcludeFixtureCleanupRegularExpression",
+ args[i].c_str());
+ }
+
if (this->CheckArgument(arg, "--rerun-failed")) {
this->GetHandler("test")->SetPersistentOption("RerunFailed", "true");
this->GetHandler("memcheck")->SetPersistentOption("RerunFailed", "true");