[Cmake-commits] CMake branch, next, updated. v2.8.1-1447-g4115fc4

David Cole david.cole at kitware.com
Mon Jun 21 14:50:36 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  4115fc40489a878d3125b3275b830861359b8ddf (commit)
       via  4ee426b057186fd2f85301e71d65f3dfecace828 (commit)
      from  11a5cba453515ea269fa54034c2354ffea982658 (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=4115fc40489a878d3125b3275b830861359b8ddf
commit 4115fc40489a878d3125b3275b830861359b8ddf
Merge: 11a5cba 4ee426b
Author: David Cole <david.cole at kitware.com>
Date:   Mon Jun 21 14:50:30 2010 -0400

    Merge branch 'fix-CheckSourceTree-test' into next


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ee426b057186fd2f85301e71d65f3dfecace828
commit 4ee426b057186fd2f85301e71d65f3dfecace828
Author: David Cole <david.cole at kitware.com>
Date:   Mon Jun 21 14:46:30 2010 -0400

    Look in the ctest ini file for GitCommand.
    
    If GIT_EXECUTABLE is not passed into the test, but the source
    tree is a git checkout, then use GitCommand or UpdateCommand
    from the ctest ini file to set its value. Presumably, a dashboard
    running the test suite had to have set this properly in order
    to do the ctest_update step.

diff --git a/Tests/CMakeTests/CheckSourceTreeTest.cmake.in b/Tests/CMakeTests/CheckSourceTreeTest.cmake.in
index 39289f0..9150aef 100644
--- a/Tests/CMakeTests/CheckSourceTreeTest.cmake.in
+++ b/Tests/CMakeTests/CheckSourceTreeTest.cmake.in
@@ -128,6 +128,51 @@ if(is_cvs_checkout AND CVS_EXECUTABLE)
 endif()
 
 
+# If no GIT_EXECUTABLE, see if we can figure out which git was used
+# for the ctest_update step on this dashboard...
+#
+if(is_git_checkout AND NOT GIT_EXECUTABLE)
+  set(ctest_ini_file "")
+  set(exe "")
+
+  # Use the old name:
+  if(EXISTS "${CMake_BINARY_DIR}/DartConfiguration.tcl")
+    set(ctest_ini_file "${CMake_BINARY_DIR}/DartConfiguration.tcl")
+  endif()
+
+  # But if it exists, prefer the new name:
+  if(EXISTS "${CMake_BINARY_DIR}/CTestConfiguration.ini")
+    set(ctest_ini_file "${CMake_BINARY_DIR}/CTestConfiguration.ini")
+  endif()
+
+  # If there is a ctest ini file, read the update command or git command
+  # from it:
+  #
+  if(ctest_ini_file)
+    file(STRINGS "${ctest_ini_file}" lines REGEX "^GITCommand: (.*)$")
+    string(REGEX REPLACE "^GITCommand: (.*)$" "\\1" exe "${lines}")
+    if("${exe}" STREQUAL "GITCOMMAND-NOTFOUND")
+      set(exe "")
+    endif()
+
+    if(NOT exe)
+      file(STRINGS "${ctest_ini_file}" lines REGEX "^UpdateCommand: (.*)$")
+      string(REGEX REPLACE "^UpdateCommand: (.*)$" "\\1" exe "${lines}")
+      if("${exe}" STREQUAL "GITCOMMAND-NOTFOUND")
+        set(exe "")
+      endif()
+    endif()
+  endif()
+
+  if(exe)
+    set(GIT_EXECUTABLE "${exe}")
+    message("info: set GIT_EXECUTABLE to '${GIT_EXECUTABLE}' based on '${ctest_ini_file}'")
+  else()
+    message(FATAL_ERROR "could not determine GIT_EXECUTABLE based on '${ctest_ini_file}'...")
+  endif()
+endif()
+
+
 if(is_git_checkout AND GIT_EXECUTABLE)
   # Check with "git status" if there are any local modifications to the
   # CMake source tree:
@@ -154,6 +199,15 @@ if(is_git_checkout AND GIT_EXECUTABLE)
   message("=== end output ===")
   message("")
 
+  execute_process(COMMAND ${GIT_EXECUTABLE} log -1
+    WORKING_DIRECTORY ${CMake_SOURCE_DIR}
+    OUTPUT_VARIABLE git_log_output
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  message("=== output of 'git log -1' ===")
+  message("${git_log_output}")
+  message("=== end output ===")
+  message("")
+
   message("Copy/paste this command to reproduce:")
   message("cd \"${CMake_SOURCE_DIR}\" && \"${GIT_EXECUTABLE}\" status")
   message("")

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

Summary of changes:
 Tests/CMakeTests/CheckSourceTreeTest.cmake.in |   54 +++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list