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.
This commit is contained in:
parent
16b99e6cae
commit
8af8eab7a4
|
@ -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);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue