CTest: perform cycle test early

This commit is contained in:
Nils Gladitz 2013-10-19 09:28:18 +02:00
parent 6d4d7ca955
commit 1b750cbf9a
2 changed files with 8 additions and 1 deletions

View File

@ -41,6 +41,7 @@ cmCTestMultiProcessHandler::cmCTestMultiProcessHandler()
this->Completed = 0;
this->RunningCount = 0;
this->StopTimePassed = false;
this->HasCycles = false;
}
cmCTestMultiProcessHandler::~cmCTestMultiProcessHandler()
@ -65,6 +66,11 @@ cmCTestMultiProcessHandler::SetTests(TestMap& tests,
if(!this->CTest->GetShowOnly())
{
this->ReadCostData();
this->HasCycles = !this->CheckCycles();
if(this->HasCycles)
{
return;
}
this->CreateTestCostList();
}
}
@ -79,7 +85,7 @@ void cmCTestMultiProcessHandler::SetParallelLevel(size_t level)
void cmCTestMultiProcessHandler::RunTests()
{
this->CheckResume();
if(!this->CheckCycles())
if(this->HasCycles)
{
return;
}

View File

@ -111,6 +111,7 @@ protected:
std::set<cmCTestRunTest*> RunningTests; // current running tests
cmCTestTestHandler * TestHandler;
cmCTest* CTest;
bool HasCycles;
};
#endif