[Cmake-commits] CMake branch, next, updated. v2.8.1-1216-g0c859e8

cmake-commits at cmake.org cmake-commits at cmake.org
Wed May 19 09:14:44 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  0c859e8d4e9966e7a818756ce379b561da194b2b (commit)
      from  847a79544d7ac3ee708386ef12f40b336047003e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c859e8d4e9966e7a818756ce379b561da194b2b
commit 0c859e8d4e9966e7a818756ce379b561da194b2b
Author: Zach Mullen <zach.mullen at kitware.com>
Date:   Wed May 19 09:11:23 2010 -0400

    Cost-based test scheduling should only be done in parallel mode.

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);
       }
     }
 }
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index b9cee6c..d2742ec 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1036,9 +1036,9 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
   
   bool randomSchedule = this->CTest->GetScheduleType() == "Random";
   if(randomSchedule)
-  {
+    {
     srand((unsigned)time(0));
-  }
+    }
 
   for (ListOfTests::iterator it = this->TestList.begin();
        it != this->TestList.end(); ++it)

-----------------------------------------------------------------------

Summary of changes:
 Source/CTest/cmCTestMultiProcessHandler.cxx |   21 +++++++++++++++------
 Source/CTest/cmCTestTestHandler.cxx         |    4 ++--
 2 files changed, 17 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list