summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-09-09 15:44:16 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-09-09 15:44:16 (GMT)
commit6bc394c8e56af1618428fa03b541d9c222aef63e (patch)
tree9e96729ec96d21d67dee0edd881b373d2b25aaf0 /Source
parentacbe39ff7e3016638f5d45c0ae0f784a724d7fd2 (diff)
downloadCMake-6bc394c8e56af1618428fa03b541d9c222aef63e.zip
CMake-6bc394c8e56af1618428fa03b541d9c222aef63e.tar.gz
CMake-6bc394c8e56af1618428fa03b541d9c222aef63e.tar.bz2
BUG: 0007569 add ability to do -R/-E in ctest_test command
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestTestCommand.cxx10
-rw-r--r--Source/CTest/cmCTestTestCommand.h15
2 files changed, 22 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx
index 4c962e9..b6f298a 100644
--- a/Source/CTest/cmCTestTestCommand.cxx
+++ b/Source/CTest/cmCTestTestCommand.cxx
@@ -24,6 +24,8 @@ cmCTestTestCommand::cmCTestTestCommand()
this->Arguments[ctt_START] = "START";
this->Arguments[ctt_END] = "END";
this->Arguments[ctt_STRIDE] = "STRIDE";
+ this->Arguments[ctt_EXCLUDE] = "EXCLUDE";
+ this->Arguments[ctt_INCLUDE] = "INCLUDE";
this->Arguments[ctt_LAST] = 0;
this->Last = ctt_LAST;
}
@@ -68,6 +70,14 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
handler->SetOption("TestsToRunInformation",
testsToRunString.str().c_str());
}
+ if(this->Values[ctt_EXCLUDE])
+ {
+ handler->SetOption("ExcludeRegularExpression", this->Values[ctt_EXCLUDE]);
+ }
+ if(this->Values[ctt_INCLUDE])
+ {
+ handler->SetOption("IncludeRegularExpression", this->Values[ctt_INCLUDE]);
+ }
return handler;
}
diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h
index 895de00..e449548 100644
--- a/Source/CTest/cmCTestTestCommand.h
+++ b/Source/CTest/cmCTestTestCommand.h
@@ -44,7 +44,7 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
- virtual const char* GetName() { return "CTEST_TEST";}
+ virtual const char* GetName() { return "ctest_test";}
/**
* Succinct documentation.
@@ -60,9 +60,16 @@ public:
virtual const char* GetFullDocumentation()
{
return
- " CTEST_TEST([BUILD build_dir] [RETURN_VALUE res])\n"
+ " CTEST_TEST([BUILD build_dir]\n"
+ " [START start number] [END end number]\n"
+ " [STRIDE stride number] [EXCLUDE exclude regex ]\n"
+ " [INCLUDE include regex] [RETURN_VALUE res] )\n"
"Tests the given build directory and stores results in Test.xml. The "
- "second argument is a variable that will hold value.";
+ "second argument is a variable that will hold value. Optionally, "
+ "you can specify the starting test number START, the ending test number "
+ "END, the number of tests to skip between each test STRIDE, a regular "
+ "expression for tests to run INCLUDE, or a regular expression for tests "
+ "to not run EXCLUDE.";
}
cmTypeMacro(cmCTestTestCommand, cmCTestHandlerCommand);
@@ -77,6 +84,8 @@ protected:
ctt_START,
ctt_END,
ctt_STRIDE,
+ ctt_EXCLUDE,
+ ctt_INCLUDE,
ctt_LAST
};
};