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.
This commit is contained in:
Pedro Navarro
2013-10-22 15:11:22 -07:00
committed by Brad King
parent ddef8a7cff
commit 970c82348b
11 changed files with 969 additions and 2 deletions
+5
View File
@@ -149,6 +149,7 @@ if(BUILD_TESTING)
find_program(BZRCOMMAND bzr)
find_program(HGCOMMAND hg)
find_program(GITCOMMAND git)
find_program(P4COMMAND p4)
if(NOT UPDATE_TYPE)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS")
@@ -180,6 +181,9 @@ if(BUILD_TESTING)
elseif("${_update_type}" STREQUAL "git")
set(UPDATE_COMMAND "${GITCOMMAND}")
set(UPDATE_OPTIONS "${GIT_UPDATE_OPTIONS}")
elseif("${_update_type}" STREQUAL "p4")
set(UPDATE_COMMAND "${P4COMMAND}")
set(UPDATE_OPTIONS "${P4_UPDATE_OPTIONS}")
endif()
set(DART_TESTING_TIMEOUT 1500 CACHE STRING
@@ -275,6 +279,7 @@ if(BUILD_TESTING)
CVS_UPDATE_OPTIONS
DART_TESTING_TIMEOUT
GITCOMMAND
P4COMMAND
HGCOMMAND
MAKECOMMAND
MEMORYCHECK_COMMAND