diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2010-05-19 15:20:30 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2010-05-19 15:20:30 (GMT) |
commit | fa3c1817b13362ef10e332e384553df33fb21d97 (patch) | |
tree | 00c9f02bb884ce3a2a36fe5fdf86569223d96509 /Source/CTest | |
parent | 6138ff02edc05e68c5dea8b3c38f5359bda977bb (diff) | |
download | CMake-fa3c1817b13362ef10e332e384553df33fb21d97.zip CMake-fa3c1817b13362ef10e332e384553df33fb21d97.tar.gz CMake-fa3c1817b13362ef10e332e384553df33fb21d97.tar.bz2 |
Cost-based test scheduling should only be done in parallel mode.
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 21 |
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); } } } |