From 8af8eab7a43aa80ba89d082e23928e19265be885 Mon Sep 17 00:00:00 2001 From: David Cole Date: Fri, 18 Feb 2011 13:10:26 -0500 Subject: Use stable_sort to preserve test order (#11877) Using sort results in a possibly-modified sorting when all elements are "tied" - use stable_sort instead to preserve the original ordering of tied elements. --- Source/CTest/cmCTestMultiProcessHandler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index f3a4457..2cae802 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -484,7 +484,7 @@ void cmCTestMultiProcessHandler::CreateTestCostList() } TestComparator comp(this); - std::sort(SortedTests.begin(), SortedTests.end(), comp); + std::stable_sort(SortedTests.begin(), SortedTests.end(), comp); } //--------------------------------------------------------- -- cgit v0.12