diff options
author | Brad King <brad.king@kitware.com> | 2009-07-10 15:08:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-10 15:08:05 (GMT) |
commit | d4d467dbd5c4a1590333eeeb3082ad46dc9698df (patch) | |
tree | 9ade1437126f78d4d1a5d292848df45ce33cadda /Tests/CMakeLists.txt | |
parent | c0e8c0f5aa004fb7f8c1804a5e29bd22862c9360 (diff) | |
download | CMake-d4d467dbd5c4a1590333eeeb3082ad46dc9698df.zip CMake-d4d467dbd5c4a1590333eeeb3082ad46dc9698df.tar.gz CMake-d4d467dbd5c4a1590333eeeb3082ad46dc9698df.tar.bz2 |
ENH: Teach CTest to handle Mercurial repositories
This creates cmCTestHG to drive CTest Update handling on hg-based work
trees. Currently we always update to the head of the remote tracking
branch (hg pull), so the nightly start time is ignored for Nightly
builds. A later change will address this.
See issue #7879. Patch from Emmanuel Christophe. I modified the patch
slightly for code style, to finish up some parsing details, and to fix
the test.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 69c731d..cc0013b 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -976,6 +976,24 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateGIT_DIR}") ENDIF(CTEST_TEST_UPDATE_GIT) + # Test CTest Update with HG + FIND_PROGRAM(HG_EXECUTABLE NAMES hg) + MARK_AS_ADVANCED(HG_EXECUTABLE) + SET(CTEST_TEST_UPDATE_HG 0) + IF(HG_EXECUTABLE) + IF(NOT "${CVS_EXECUTABLE}" MATCHES "cygwin" OR UNIX) + SET(CTEST_TEST_UPDATE_HG 1) + ENDIF(NOT "${CVS_EXECUTABLE}" MATCHES "cygwin" OR UNIX) + ENDIF(HG_EXECUTABLE) + IF(CTEST_TEST_UPDATE_HG) + SET(CTestUpdateHG_DIR "CTest UpdateHG") + CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CTestUpdateHG.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestUpdateHG.cmake" @ONLY) + ADD_TEST(CTest.UpdateHG ${CMAKE_CMAKE_COMMAND} + -P "${CMake_BINARY_DIR}/Tests/CTestUpdateHG.cmake" + ) + LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateHG_DIR}") + ENDIF(CTEST_TEST_UPDATE_HG) ENDIF(CTEST_TEST_UPDATE) IF (CTEST_TEST_CTEST AND CMAKE_RUN_LONG_TESTS) |