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  26f9350b464de38c3f2c486fe13af4173e97dbff (commit)
       via  dfdf3b05090e212a77e7f31904d2df08c5400c9d (commit)
      from  af0f0a411f661198608d2b2aeb9b8684b7c464a3 (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=26f9350b464de38c3f2c486fe13af4173e97dbff
commit 26f9350b464de38c3f2c486fe13af4173e97dbff
Merge: af0f0a4 dfdf3b0
Author:     Nils Gladitz <nilsglad...@gmail.com>
AuthorDate: Fri Dec 20 18:08:58 2013 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Dec 20 18:08:58 2013 -0500

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


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dfdf3b05090e212a77e7f31904d2df08c5400c9d
commit dfdf3b05090e212a77e7f31904d2df08c5400c9d
Author:     Nils Gladitz <nilsglad...@gmail.com>
AuthorDate: Fri Dec 20 22:44:37 2013 +0100
Commit:     Nils Gladitz <nilsglad...@gmail.com>
CommitDate: Fri Dec 20 23:59:51 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..c937e21 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2219,6 +2219,13 @@ ${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
+    TIMEOUT 10
+    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:
 Source/CTest/cmCTestMultiProcessHandler.cxx     |   53 ++++++++++++++---------
 Tests/CMakeLists.txt                            |    7 +++
 Tests/CTestTestMissingDependsExe/CMakeLists.txt |   10 ++++
 3 files changed, 49 insertions(+), 21 deletions(-)
 create mode 100644 Tests/CTestTestMissingDependsExe/CMakeLists.txt


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to