summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2009-09-02 16:35:42 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2009-09-02 16:35:42 (GMT)
commit7e20db0224571361d6d5f62fc58b12452bec826b (patch)
treeb7f0fc10d4e82c0068a7ddffc087fb028fcd4168 /Source/CTest
parent69fd641adb32c878ded4cadee60d90596b358d1b (diff)
downloadCMake-7e20db0224571361d6d5f62fc58b12452bec826b.zip
CMake-7e20db0224571361d6d5f62fc58b12452bec826b.tar.gz
CMake-7e20db0224571361d6d5f62fc58b12452bec826b.tar.bz2
ENH: Added PARALLEL_LEVEL option to ctest_test() command.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestTestCommand.cxx6
-rw-r--r--Source/CTest/cmCTestTestCommand.h7
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx6
3 files changed, 16 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx
index 3efb39b..487f3bd 100644
--- a/Source/CTest/cmCTestTestCommand.cxx
+++ b/Source/CTest/cmCTestTestCommand.cxx
@@ -28,6 +28,7 @@ cmCTestTestCommand::cmCTestTestCommand()
this->Arguments[ctt_INCLUDE] = "INCLUDE";
this->Arguments[ctt_EXCLUDE_LABEL] = "EXCLUDE_LABEL";
this->Arguments[ctt_INCLUDE_LABEL] = "INCLUDE_LABEL";
+ this->Arguments[ctt_PARALLEL_LEVEL] = "PARALLEL_LEVEL";
this->Arguments[ctt_LAST] = 0;
this->Last = ctt_LAST;
}
@@ -90,6 +91,11 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
handler->SetOption("LabelRegularExpression",
this->Values[ctt_INCLUDE_LABEL]);
}
+ if(this->Values[ctt_PARALLEL_LEVEL])
+ {
+ handler->SetOption("ParallelLevel",
+ this->Values[ctt_PARALLEL_LEVEL]);
+ }
return handler;
}
diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h
index 3147637..f294e02 100644
--- a/Source/CTest/cmCTestTestCommand.h
+++ b/Source/CTest/cmCTestTestCommand.h
@@ -65,7 +65,8 @@ public:
" [STRIDE stride number] [EXCLUDE exclude regex ]\n"
" [INCLUDE include regex] [RETURN_VALUE res] \n"
" [EXCLUDE_LABEL exclude regex] \n"
- " [INCLUDE_LABEL label regex] )\n"
+ " [INCLUDE_LABEL label regex] \n"
+ " [PARALLEL_LEVEL level] )\n"
"Tests the given build directory and stores results in Test.xml. The "
"second argument is a variable that will hold value. Optionally, "
"you can specify the starting test number START, the ending test number "
@@ -73,7 +74,8 @@ public:
"expression for tests to run INCLUDE, or a regular expression for tests "
"to not run EXCLUDE. EXCLUDE_LABEL and INCLUDE_LABEL are regular "
"expression for test to be included or excluded by the test "
- "property LABEL."
+ "property LABEL. PARALLEL_LEVEL should be set to a positive number "
+ "representing the number of tests to be run in parallel."
"\n"
CTEST_COMMAND_APPEND_OPTION_DOCS;
}
@@ -94,6 +96,7 @@ protected:
ctt_INCLUDE,
ctt_EXCLUDE_LABEL,
ctt_INCLUDE_LABEL,
+ ctt_PARALLEL_LEVEL,
ctt_LAST
};
};
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 1af1cf9..c35c8d4 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -495,7 +495,11 @@ int cmCTestTestHandler::ProcessHandler()
{
// Update internal data structure from generic one
this->SetTestsToRunInformation(this->GetOption("TestsToRunInformation"));
- this->SetUseUnion(cmSystemTools::IsOn(this->GetOption("UseUnion")));
+ this->SetUseUnion(cmSystemTools::IsOn(this->GetOption("UseUnion")));
+ if(this->GetOption("ParallelLevel"))
+ {
+ this->CTest->SetParallelLevel(atoi(this->GetOption("ParallelLevel")));
+ }
const char* val;
val = this->GetOption("LabelRegularExpression");
if ( val )