[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.17.2.3 1.17.2.4 CheckSourceTreeTest.cmake.in 1.4 1.4.2.1 GetFilenameComponentRealpathTest.cmake.in 1.1 1.1.4.1

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Jan 28 16:48:08 EST 2010


Update of /cvsroot/CMake/CMake/Tests/CMakeTests
In directory public:/mounts/ram/cvs-serv23913/Tests/CMakeTests

Modified Files:
      Tag: CMake-2-8
	CMakeLists.txt CheckSourceTreeTest.cmake.in 
	GetFilenameComponentRealpathTest.cmake.in 
Log Message:
CMake 2.8.1-rc1


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CMakeTests/CMakeLists.txt,v
retrieving revision 1.17.2.3
retrieving revision 1.17.2.4
diff -C 2 -d -r1.17.2.3 -r1.17.2.4
*** CMakeLists.txt	28 Oct 2009 16:15:52 -0000	1.17.2.3
--- CMakeLists.txt	28 Jan 2010 21:48:06 -0000	1.17.2.4
***************
*** 1,3 ****
! SET(CMAKE_EXECUTABLE "${EXECUTABLE_OUTPUT_PATH}/cmake")
  
  
--- 1,3 ----
! SET(CMAKE_EXECUTABLE "${CMake_BIN_DIR}/cmake")
  
  
***************
*** 51,54 ****
--- 51,55 ----
      "-DCMake_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}"
      "-DCVS_EXECUTABLE:STRING=${CVS_EXECUTABLE}"
+     "-DHOME:STRING=$ENV{HOME}"
      )
    AddCMakeTest(CheckSourceTree "${CheckSourceTree_PreArgs}")

Index: GetFilenameComponentRealpathTest.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CMakeTests/GetFilenameComponentRealpathTest.cmake.in,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -C 2 -d -r1.1 -r1.1.4.1
*** GetFilenameComponentRealpathTest.cmake.in	9 Feb 2009 14:23:55 -0000	1.1
--- GetFilenameComponentRealpathTest.cmake.in	28 Jan 2010 21:48:06 -0000	1.1.4.1
***************
*** 14,17 ****
--- 14,32 ----
  
  #
+ # Test treatment of relative paths
+ #
+ foreach(c REALPATH ABSOLUTE)
+   get_filename_component(dir "subdir/THIS_IS_A_NONEXISTENT_FILE" ${c})
+   if(NOT "${dir}" STREQUAL "${bindir}/subdir/THIS_IS_A_NONEXISTENT_FILE")
+     message(FATAL_ERROR
+       "${c} does not handle relative paths.  Expected:\n"
+       "  ${bindir}/subdir/THIS_IS_A_NONEXISTENT_FILE\n"
+       "but got:\n"
+       "  ${nonexistent1}\n"
+       )
+   endif()
+ endforeach()
+ 
+ #
  # Test symbolic link resolution
  #

Index: CheckSourceTreeTest.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CMakeTests/CheckSourceTreeTest.cmake.in,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C 2 -d -r1.4 -r1.4.2.1
*** CheckSourceTreeTest.cmake.in	27 Jul 2009 16:04:03 -0000	1.4
--- CheckSourceTreeTest.cmake.in	28 Jan 2010 21:48:06 -0000	1.4.2.1
***************
*** 7,12 ****
--- 7,14 ----
  message("CMake_SOURCE_DIR='${CMake_SOURCE_DIR}'")
  message("CVS_EXECUTABLE='${CVS_EXECUTABLE}'")
+ message("HOME='${HOME}'")
  message("ENV{DASHBOARD_TEST_FROM_CTEST}='$ENV{DASHBOARD_TEST_FROM_CTEST}'")
  message("")
+ string(REPLACE "\\" "\\\\" HOME "${HOME}")
  
  
***************
*** 41,44 ****
--- 43,56 ----
  
  
+ # If this does not appear to be a CVS checkout, just pass the test here and now.
+ # (Do not let the test fail if it is run in a tree *exported* from CVS or
+ # unpacked from a .zip file source installer...)
+ #
+ if(NOT EXISTS "${CMake_SOURCE_DIR}/CVS/Root")
+   message("source tree is not a CVS checkout... test passes by early return...")
+   return()
+ endif()
+ 
+ 
  # Check with "cvs -q -n up -dP" if there are any local modifications to the
  # CMake source tree:
***************
*** 48,51 ****
--- 60,70 ----
  message("cd \"${CMake_SOURCE_DIR}\" && \"${CVS_EXECUTABLE}\" -q -n up -dP")
  message("")
+ 
+ # Use the HOME value passed in to the script for calling cvs so it can find
+ # its .cvspass and other file(s)
+ #
+ set(original_ENV_HOME "$ENV{HOME}")
+ set(ENV{HOME} "${HOME}")
+ 
  execute_process(COMMAND ${CVS_EXECUTABLE} -q -n up -dP
    WORKING_DIRECTORY ${CMake_SOURCE_DIR}
***************
*** 54,57 ****
--- 73,78 ----
    RESULT_VARIABLE rv)
  
+ set(ENV{HOME} "${original_ENV_HOME}")
+ 
  message("Results of running '${CVS_EXECUTABLE} -q -n up -dP'")
  message("rv='${rv}'")
***************
*** 60,63 ****
--- 81,88 ----
  message("")
  
+ if(NOT rv STREQUAL 0)
+   message(FATAL_ERROR "error: 'cvs -q -n up -dP' attempt failed... (see output above)")
+ endif()
+ 
  # Analyze cvs output:
  #



More information about the Cmake-commits mailing list