summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2009-09-03 14:47:14 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2009-09-03 14:47:14 (GMT)
commit659171d1f72e24c2cdda6a935f29f528cc518969 (patch)
tree20f254b0f953956ada7b475bb22ff7a72c1b352e /Source/CTest
parente3086213820a97db8432bf6089155509164fe960 (diff)
downloadCMake-659171d1f72e24c2cdda6a935f29f528cc518969.zip
CMake-659171d1f72e24c2cdda6a935f29f528cc518969.tar.gz
CMake-659171d1f72e24c2cdda6a935f29f528cc518969.tar.bz2
ENH: Added PARALLEL_LEVEL option for ctest_memcheck(). Added PROCESSORS option to set_tests_properties (implementation to come).
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestMemCheckCommand.h6
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx9
-rw-r--r--Source/CTest/cmCTestRunTest.cxx2
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx9
-rw-r--r--Source/CTest/cmCTestTestHandler.h2
5 files changed, 22 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestMemCheckCommand.h b/Source/CTest/cmCTestMemCheckCommand.h
index eeb1327..3e5cdd6 100644
--- a/Source/CTest/cmCTestMemCheckCommand.h
+++ b/Source/CTest/cmCTestMemCheckCommand.h
@@ -67,7 +67,8 @@ public:
" [STRIDE stride number] [EXCLUDE exclude regex ]\n"
" [INCLUDE include 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 MemCheck.xml. "
"The second argument is a variable that will hold value. Optionally, "
"you can specify the starting test number START, the ending test number "
@@ -75,7 +76,8 @@ public:
"expression for tests to run INCLUDE, or a regular expression for tests "
"not to run EXCLUDE. EXCLUDE_LABEL and INCLUDE_LABEL are regular "
"expressions for tests 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;
}
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index be5bbfd..0f7cd3c 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -74,10 +74,10 @@ void cmCTestMultiProcessHandler::RunTests()
void cmCTestMultiProcessHandler::SubmitBatchTests()
{
for(cmCTest::CTestConfigurationMap::iterator i =
- this->CTest->CTestConfiguration.begin();
- i != this->CTest->CTestConfiguration.end(); ++i)
+ this->CTest->CTestConfiguration.begin();
+ i != this->CTest->CTestConfiguration.end(); ++i)
{
- cmCTestLog(this->CTest, HANDLER_OUTPUT, i->first
+ cmCTestLog(this->CTest, HANDLER_OUTPUT, i->first
<< " = " << i->second << std::endl);
}
}
@@ -161,6 +161,9 @@ void cmCTestMultiProcessHandler::StartNextTests()
for(TestMap::iterator i = tests.begin();
i != tests.end(); ++i)
{
+ int processors = this->Properties[i->first]->Processors;
+
+// if(processors > )
// start test should start only one test
if(this->StartTest(i->first))
{
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 49bce1e..81dff52 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -437,7 +437,7 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
if ( this->TestHandler->MemCheck )
{
- cmCTestLog(this->CTest, HANDLER_OUTPUT, "Memory Check");
+ cmCTestLog(this->CTest, HANDLER_OUTPUT, "MemCheck");
}
else
{
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index c35c8d4..94008d1 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1982,6 +1982,14 @@ bool cmCTestTestHandler::SetTestsProperties(
std::string(crit->c_str())));
}
}
+ if ( key == "PROCESSORS" )
+ {
+ rtit->Processors = atoi(val.c_str());
+ if(rtit->Processors < 1)
+ {
+ rtit->Processors = 1;
+ }
+ }
if ( key == "DEPENDS" )
{
std::vector<std::string> lval;
@@ -2109,6 +2117,7 @@ bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args)
test.IsInBasedOnREOptions = true;
test.WillFail = false;
test.Timeout = 0;
+ test.Processors = 1;
if (this->UseIncludeRegExpFlag &&
!this->IncludeTestsRegularExpression.find(testname.c_str()))
{
diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h
index 12e86a9..899a638 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -98,6 +98,8 @@ public:
bool WillFail;
double Timeout;
int Index;
+ //Requested number of process slots
+ int Processors;
std::vector<std::string> Environment;
std::vector<std::string> Labels;
};