summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-06-07 18:18:30 (GMT)
committerBrad King <brad.king@kitware.com>2010-06-07 18:18:30 (GMT)
commit6068651cf7cafd0b868f4c8f62d10d729bf1d42a (patch)
treeaa8e439d50aa012c6c3539c0bb45460e33998ab4
parentbbd528c8007c03d35868461f3db679a157a3cca6 (diff)
parentfa3c1817b13362ef10e332e384553df33fb21d97 (diff)
downloadCMake-6068651cf7cafd0b868f4c8f62d10d729bf1d42a.zip
CMake-6068651cf7cafd0b868f4c8f62d10d729bf1d42a.tar.gz
CMake-6068651cf7cafd0b868f4c8f62d10d729bf1d42a.tar.bz2
Merge branch 'CTestScheduler'
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx21
1 files changed, 15 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index c1ca9ea..8a69780 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -453,15 +453,24 @@ void cmCTestMultiProcessHandler::CreateTestCostList()
for(TestMap::iterator i = this->Tests.begin();
i != this->Tests.end(); ++i)
{
- std::string name = this->Properties[i->first]->Name;
- if(std::find(this->LastTestsFailed.begin(), this->LastTestsFailed.end(),
- name) != this->LastTestsFailed.end())
+ //We only want to schedule them by cost in a parallel situation
+ if(this->ParallelLevel > 1)
{
- this->TestCosts[FLT_MAX].insert(i->first);
+ std::string name = this->Properties[i->first]->Name;
+ if(std::find(this->LastTestsFailed.begin(), this->LastTestsFailed.end(),
+ name) != this->LastTestsFailed.end())
+ {
+ this->TestCosts[FLT_MAX].insert(i->first);
+ }
+ else
+ {
+ this->TestCosts[this->Properties[i->first]->Cost].insert(i->first);
+ }
}
- else
+ else //we ignore their cost
{
- this->TestCosts[this->Properties[i->first]->Cost].insert(i->first);
+ this->TestCosts[this->Tests.size()
+ - this->Properties[i->first]->Index].insert(i->first);
}
}
}