ENH: Added PARALLEL_LEVEL option to ctest_test() command.
This commit is contained in:
parent
69fd641adb
commit
7e20db0224
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue