From 7b26c06e0954f80e670f739587e5e92d20780e26 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Fri, 25 Feb 2011 19:12:17 +0200 Subject: [PATCH] Backport patch to fix test order (broken in 2.8.4). Add backport_test_order_fix.diff to restore conpatibility with earlier versions with respect to the test run order. (Closes: #615054) --- debian/changelog | 2 ++ debian/patches/backport_test_order_fix.diff | 29 +++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 32 insertions(+) create mode 100644 debian/patches/backport_test_order_fix.diff diff --git a/debian/changelog b/debian/changelog index 9c7880271..cd6abaf69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,7 @@ cmake (2.8.4+dfsg.1-2) UNRELEASED; urgency=low + * Add backport_test_order_fix.diff to restore conpatibility with earlier + versions with respect to the test run order. (Closes: #615054) -- Modestas Vainius Fri, 25 Feb 2011 19:01:22 +0200 diff --git a/debian/patches/backport_test_order_fix.diff b/debian/patches/backport_test_order_fix.diff new file mode 100644 index 000000000..063077931 --- /dev/null +++ b/debian/patches/backport_test_order_fix.diff @@ -0,0 +1,29 @@ +From: David Cole +Date: Fri, 18 Feb 2011 18:10:26 +0000 (-0500) +Subject: Use stable_sort to preserve test order (#11877) +Origin: backport, http://cmake.org/gitweb?p=cmake.git;a=commitdiff_plain;h=8af8eab7a43aa80ba89d082e23928e19265be885 +Acked-By: Modestas Vainius +Last-Update: 2011-02-18 +Bug: http://public.kitware.com/Bug/view.php?id=11877 +Bug-Debian: http://bugs.debian.org/615054 + +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. +--- + +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); + } + + //--------------------------------------------------------- diff --git a/debian/patches/series b/debian/patches/series index 8e4365290..0982eaa05 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ fixup_manpages.diff FindBoost_add_-lpthread_#563479.diff +backport_test_order_fix.diff