diff options
author | Brad King <brad.king@kitware.com> | 2013-11-01 13:40:26 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-11-01 13:40:26 (GMT) |
commit | 20bb60917125ee69e5ce0131934f214be15fdcb6 (patch) | |
tree | 504e7b15bf301c37ed690e493f49b542e2812ef2 /Source | |
parent | e065decd43186117913044984eaefd5040cf9063 (diff) | |
parent | 2eccdbdc2a7d39a1a56e5ed78abb65ad286b7125 (diff) | |
download | CMake-20bb60917125ee69e5ce0131934f214be15fdcb6.zip CMake-20bb60917125ee69e5ce0131934f214be15fdcb6.tar.gz CMake-20bb60917125ee69e5ce0131934f214be15fdcb6.tar.bz2 |
Merge topic 'fix-duplicate-test-run'
2eccdbd CTest: prevent tests from being inserted in the cost list twice
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 6e9d0e3..4c39d10 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -441,6 +441,8 @@ int cmCTestMultiProcessHandler::SearchByName(std::string name) //--------------------------------------------------------- void cmCTestMultiProcessHandler::CreateTestCostList() { + TestSet alreadySortedTests; + std::list<TestSet> priorityStack; priorityStack.push_back(TestSet()); TestSet &topLevel = priorityStack.back(); @@ -456,6 +458,7 @@ void cmCTestMultiProcessHandler::CreateTestCostList() { //If the test failed last time, it should be run first. this->SortedTests.push_back(i->first); + alreadySortedTests.insert(i->first); } else { @@ -513,7 +516,11 @@ void cmCTestMultiProcessHandler::CreateTestCostList() for(TestList::const_iterator j = sortedCopy.begin(); j != sortedCopy.end(); ++j) { - this->SortedTests.push_back(*j); + if(alreadySortedTests.find(*j) == alreadySortedTests.end()) + { + this->SortedTests.push_back(*j); + alreadySortedTests.insert(*j); + } } } } |