[Cmake-commits] [cmake-commits] david.cole committed CMakeLists.txt 1.13 1.14 CheckSourceTreeTest.cmake.in NONE 1.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Jul 24 15:58:25 EDT 2009
Update of /cvsroot/CMake/CMake/Tests/CMakeTests
In directory public:/mounts/ram/cvs-serv1394/Tests/CMakeTests
Modified Files:
CMakeLists.txt
Added Files:
CheckSourceTreeTest.cmake.in
Log Message:
BUG: Additional fix necessary for issue #8481 so that Xcode builds do not write files into the source tree. Also add a test that runs last to check for local modifications in CMake_SOURCE_DIR based on whether 'cvs -q -n up -dP' output is empty. Test fails on dashboard runs when there are local modifications. Test passes on non-dashboard runs with local modifications so that CMake developers may have mods when running the test locally.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CMakeTests/CMakeLists.txt,v
retrieving revision 1.13
retrieving revision 1.14
diff -C 2 -d -r1.13 -r1.14
*** CMakeLists.txt 23 Jul 2009 14:07:37 -0000 1.13
--- CMakeLists.txt 24 Jul 2009 19:58:23 -0000 1.14
***************
*** 26,27 ****
--- 26,39 ----
)
AddCMakeTest(GetPrerequisites "${GetPrerequisites_PreArgs}")
+
+ # Run CheckSourceTree as the very last test in the CMake/CTest/CPack test
+ # suite. It detects if any changes have been made to the CMake source tree
+ # by any previous configure, build or test steps.
+ #
+ if(do_cvs_tests)
+ set(CheckSourceTree_PreArgs
+ "-DCMake_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}"
+ "-DCVS_EXECUTABLE:STRING=${CVS_EXECUTABLE}"
+ )
+ AddCMakeTest(CheckSourceTree "${CheckSourceTree_PreArgs}")
+ endif()
--- NEW FILE: CheckSourceTreeTest.cmake.in ---
# Check the CMake source tree and report anything suspicious...
#
message(STATUS
"=============================================================================")
message(STATUS "CTEST_FULL_OUTPUT (Avoid ctest truncation of output)")
message(STATUS "")
message(STATUS "CMake_SOURCE_DIR='${CMake_SOURCE_DIR}'")
message(STATUS "CVS_EXECUTABLE='${CVS_EXECUTABLE}'")
message(STATUS "ENV{DASHBOARD_TEST_FROM_CTEST}='$ENV{DASHBOARD_TEST_FROM_CTEST}'")
message(STATUS "")
# Check with "cvs -q -n up -dP" if there are any local modifications to the
# CMake source tree:
#
message(STATUS
"=============================================================================")
execute_process(COMMAND ${CVS_EXECUTABLE} -q -n up -dP
WORKING_DIRECTORY ${CMake_SOURCE_DIR}
OUTPUT_VARIABLE ov
ERROR_VARIABLE ev
RESULT_VARIABLE rv)
set(modifications 0)
if(NOT ov STREQUAL "")
set(modifications 1)
endif()
message(STATUS "Results of running '${CVS_EXECUTABLE} -q -n up -dP'")
message(STATUS "rv='${rv}'")
message(STATUS "ov='${ov}'")
message(STATUS "ev='${ev}'")
message(STATUS "modifications='${modifications}'")
# Decide if the test passes or fails:
#
if("$ENV{DASHBOARD_TEST_FROM_CTEST}" STREQUAL "")
message(STATUS "non-dashboard interactive test run")
# developers are allowed to have local modifications... :-)
else()
message(STATUS "dashboard test run")
if(modifications)
message(FATAL_ERROR "test fails: source tree modifications")
endif()
endif()
message(STATUS "test passes")
More information about the Cmake-commits
mailing list