CTest: restore old failed test priority in serial test runs

This commit is contained in:
Nils Gladitz 2013-10-27 08:44:55 +01:00
parent b63c71aa35
commit 2b5c9da5bc
1 changed files with 4 additions and 3 deletions

View File

@ -445,12 +445,13 @@ void cmCTestMultiProcessHandler::CreateTestCostList()
priorityStack.push_back(TestSet()); priorityStack.push_back(TestSet());
TestSet &topLevel = priorityStack.back(); TestSet &topLevel = priorityStack.back();
// Add previously failed tests to the front of the cost list // In parallel test runs add previously failed tests to the front
// and queue other tests for further sorting // of the cost list and queue other tests for further sorting
for(TestMap::const_iterator i = this->Tests.begin(); for(TestMap::const_iterator i = this->Tests.begin();
i != this->Tests.end(); ++i) i != this->Tests.end(); ++i)
{ {
if(std::find(this->LastTestsFailed.begin(), this->LastTestsFailed.end(), if(this->ParallelLevel > 1 &&
std::find(this->LastTestsFailed.begin(), this->LastTestsFailed.end(),
this->Properties[i->first]->Name) != this->LastTestsFailed.end()) this->Properties[i->first]->Name) != this->LastTestsFailed.end())
{ {
//If the test failed last time, it should be run first. //If the test failed last time, it should be run first.