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_INCLUDE] = "INCLUDE";
|
||||||
this->Arguments[ctt_EXCLUDE_LABEL] = "EXCLUDE_LABEL";
|
this->Arguments[ctt_EXCLUDE_LABEL] = "EXCLUDE_LABEL";
|
||||||
this->Arguments[ctt_INCLUDE_LABEL] = "INCLUDE_LABEL";
|
this->Arguments[ctt_INCLUDE_LABEL] = "INCLUDE_LABEL";
|
||||||
|
this->Arguments[ctt_PARALLEL_LEVEL] = "PARALLEL_LEVEL";
|
||||||
this->Arguments[ctt_LAST] = 0;
|
this->Arguments[ctt_LAST] = 0;
|
||||||
this->Last = ctt_LAST;
|
this->Last = ctt_LAST;
|
||||||
}
|
}
|
||||||
|
@ -90,6 +91,11 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
|
||||||
handler->SetOption("LabelRegularExpression",
|
handler->SetOption("LabelRegularExpression",
|
||||||
this->Values[ctt_INCLUDE_LABEL]);
|
this->Values[ctt_INCLUDE_LABEL]);
|
||||||
}
|
}
|
||||||
|
if(this->Values[ctt_PARALLEL_LEVEL])
|
||||||
|
{
|
||||||
|
handler->SetOption("ParallelLevel",
|
||||||
|
this->Values[ctt_PARALLEL_LEVEL]);
|
||||||
|
}
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,8 @@ public:
|
||||||
" [STRIDE stride number] [EXCLUDE exclude regex ]\n"
|
" [STRIDE stride number] [EXCLUDE exclude regex ]\n"
|
||||||
" [INCLUDE include regex] [RETURN_VALUE res] \n"
|
" [INCLUDE include regex] [RETURN_VALUE res] \n"
|
||||||
" [EXCLUDE_LABEL exclude regex] \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 "
|
"Tests the given build directory and stores results in Test.xml. The "
|
||||||
"second argument is a variable that will hold value. Optionally, "
|
"second argument is a variable that will hold value. Optionally, "
|
||||||
"you can specify the starting test number START, the ending test number "
|
"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 "
|
"expression for tests to run INCLUDE, or a regular expression for tests "
|
||||||
"to not run EXCLUDE. EXCLUDE_LABEL and INCLUDE_LABEL are regular "
|
"to not run EXCLUDE. EXCLUDE_LABEL and INCLUDE_LABEL are regular "
|
||||||
"expression for test to be included or excluded by the test "
|
"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"
|
"\n"
|
||||||
CTEST_COMMAND_APPEND_OPTION_DOCS;
|
CTEST_COMMAND_APPEND_OPTION_DOCS;
|
||||||
}
|
}
|
||||||
|
@ -94,6 +96,7 @@ protected:
|
||||||
ctt_INCLUDE,
|
ctt_INCLUDE,
|
||||||
ctt_EXCLUDE_LABEL,
|
ctt_EXCLUDE_LABEL,
|
||||||
ctt_INCLUDE_LABEL,
|
ctt_INCLUDE_LABEL,
|
||||||
|
ctt_PARALLEL_LEVEL,
|
||||||
ctt_LAST
|
ctt_LAST
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -496,6 +496,10 @@ int cmCTestTestHandler::ProcessHandler()
|
||||||
// Update internal data structure from generic one
|
// Update internal data structure from generic one
|
||||||
this->SetTestsToRunInformation(this->GetOption("TestsToRunInformation"));
|
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;
|
const char* val;
|
||||||
val = this->GetOption("LabelRegularExpression");
|
val = this->GetOption("LabelRegularExpression");
|
||||||
if ( val )
|
if ( val )
|
||||||
|
|
Loading…
Reference in New Issue