diff options
author | Pedro Navarro <pnavarro@netflix.com> | 2013-10-22 22:11:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-26 14:24:15 (GMT) |
commit | 970c82348babacb918802dbf615b2224313eef55 (patch) | |
tree | ca1f6f1466038ecfcfeb56ce8cca0f3231315e93 /Tests/CMakeLists.txt | |
parent | ddef8a7cfffbbae12f2d2c556651f06346237569 (diff) | |
download | CMake-970c82348babacb918802dbf615b2224313eef55.zip CMake-970c82348babacb918802dbf615b2224313eef55.tar.gz CMake-970c82348babacb918802dbf615b2224313eef55.tar.bz2 |
ctest_update: Add support for Perforce p4 client
Teach the ctest_update implementation to use the p4 command-line
client to perform updates and extract the list of changes.
Add a CTest.UpdateP4 test like those that exist already for the other
version control tools. Make the test available when p4 and the p4d
server are found. During the test launch p4d in the background to
serve a repository from the test directory. Then direct the client
toward this server for the duration of the test.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index b9c99e3..825504b 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1877,6 +1877,26 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateHG_DIR}") endif() + + # Test CTest Update with P4 + find_program(P4_EXECUTABLE NAMES p4) + find_program(P4D_EXECUTABLE NAMES p4d) + mark_as_advanced(P4_EXECUTABLE P4D_EXECUTABLE) + set(CTEST_TEST_UPDATE_P4 0) + if(P4_EXECUTABLE AND P4D_EXECUTABLE) + if(NOT "${P4_EXECUTABLE};${P4D_EXECUTABLE}" MATCHES "cygwin" OR UNIX) + set(CTEST_TEST_UPDATE_P4 1) + endif() + endif() + if(CTEST_TEST_UPDATE_P4) + set(CTestUpdateP4_DIR "CTest UpdateP4") + configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateP4.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestUpdateP4.cmake" @ONLY) + add_test(CTest.UpdateP4 ${CMAKE_CMAKE_COMMAND} + -P "${CMake_BINARY_DIR}/Tests/CTestUpdateP4.cmake" + ) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateP4_DIR}") + endif() endif() configure_file( |