[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6345-gaefbef7

Nils Gladitz nilsgladitz at gmail.com
Sat Dec 21 03:54:44 EST 2013


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  aefbef778396c2a4d5127e68f69abc4b16f4b0bb (commit)
       via  16603b63858969865d2d17f81bfa568246f224cc (commit)
      from  5dc19bc50c79ae73449ce3504d701061912b55e2 (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=aefbef778396c2a4d5127e68f69abc4b16f4b0bb
commit aefbef778396c2a4d5127e68f69abc4b16f4b0bb
Merge: 5dc19bc 16603b6
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Sat Dec 21 03:54:42 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Dec 21 03:54:42 2013 -0500

    Merge topic 'fix-ctest-regressions' into next
    
    16603b6 CTest: fix regressions introduced by the ctest-fix-run-serial topic


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=16603b63858969865d2d17f81bfa568246f224cc
commit 16603b63858969865d2d17f81bfa568246f224cc
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Fri Dec 20 22:44:37 2013 +0100
Commit:     Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Sat Dec 21 09:54:25 2013 +0100

    CTest: fix regressions introduced by the ctest-fix-run-serial topic
    
    The first regression resulted in endless looping due to unrun test
    dependencies. The second regression prioritized all tests with dependencies
    in serial test runs.

diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 4c39d10..2d77abd 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -139,6 +139,13 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test)
     }
   else
     {
+
+    for(TestMap::iterator j = this->Tests.begin();
+      j != this->Tests.end(); ++j)
+      {
+      j->second.erase(test);
+      }
+
     this->UnlockResources(test);
     this->Completed++;
     this->TestFinishMap[test] = true;
@@ -466,34 +473,38 @@ void cmCTestMultiProcessHandler::CreateTestCostList()
       }
     }
 
-  // Repeatedly move dependencies of the tests on the current dependency level
-  // to the next level until no further dependencies exist.
-  while(priorityStack.back().size())
+  // In parallel test runs repeatedly move dependencies of the tests on
+  // the current dependency level to the next level until no
+  // further dependencies exist.
+  if(this->ParallelLevel > 1)
     {
-    TestSet &previousSet = priorityStack.back();
-    priorityStack.push_back(TestSet());
-    TestSet &currentSet = priorityStack.back();
-
-    for(TestSet::const_iterator i = previousSet.begin();
-      i != previousSet.end(); ++i)
+    while(priorityStack.back().size())
       {
-      TestSet const& dependencies = this->Tests[*i];
-      for(TestSet::const_iterator j = dependencies.begin();
-        j != dependencies.end(); ++j)
+      TestSet &previousSet = priorityStack.back();
+      priorityStack.push_back(TestSet());
+      TestSet &currentSet = priorityStack.back();
+
+      for(TestSet::const_iterator i = previousSet.begin();
+        i != previousSet.end(); ++i)
         {
-        currentSet.insert(*j);
+        TestSet const& dependencies = this->Tests[*i];
+        for(TestSet::const_iterator j = dependencies.begin();
+          j != dependencies.end(); ++j)
+          {
+          currentSet.insert(*j);
+          }
         }
-      }
 
-    for(TestSet::const_iterator i = currentSet.begin();
-      i != currentSet.end(); ++i)
-      {
-      previousSet.erase(*i);
+      for(TestSet::const_iterator i = currentSet.begin();
+        i != currentSet.end(); ++i)
+        {
+        previousSet.erase(*i);
+        }
       }
-    }
 
-  // Remove the empty dependency level
-  priorityStack.pop_back();
+    // Remove the empty dependency level
+    priorityStack.pop_back();
+    }
 
   // Reverse iterate over the different dependency levels (deepest first).
   // Sort tests within each level by COST and append them to the cost list.
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 5ea604f..105300c 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2219,6 +2219,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
   ADD_TEST_MACRO(CTestTestSerialInDepends ${CMAKE_CTEST_COMMAND} -j 4
     --output-on-failure -C "\${CTestTest_CONFIG}")
 
+  ADD_TEST_MACRO(CTestTestMissingDependsExe ${CMAKE_CTEST_COMMAND} -j 4
+    --output-on-failure -C "\${CTestTest_CONFIG}")
+  set_tests_properties(CTestTestMissingDependsExe PROPERTIES
+    PASS_REGULAR_EXPRESSION "\\*\\*\\*Not Run"
+  )
+
   if(NOT BORLAND)
     set(CTestLimitDashJ_CTEST_OPTIONS --force-new-ctest-process)
     add_test_macro(CTestLimitDashJ ${CMAKE_CTEST_COMMAND} -j 4
diff --git a/Tests/CTestTestMissingDependsExe/CMakeLists.txt b/Tests/CTestTestMissingDependsExe/CMakeLists.txt
new file mode 100644
index 0000000..9826da6
--- /dev/null
+++ b/Tests/CTestTestMissingDependsExe/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 2.8.12)
+
+project(CTestTestMissingDependsExe)
+
+enable_testing()
+
+add_test(test1 ${CMAKE_COMMAND} -E echo test)
+add_test(test2 non-existent-command)
+
+set_tests_properties(test1 PROPERTIES DEPENDS test2)

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list