Fix cvs password problems during the CMake.CheckSourceTree test. Make sure cvs has access to the original value of the HOME environment variable and not the 'CMake testing' value of it so that any cvs passwords set up on the machine work to get the list of local modifications using 'cvs up'...
This commit is contained in:
parent
700da5f266
commit
8d28ce8029
|
@ -50,6 +50,7 @@ if(do_cvs_tests)
|
||||||
"-DCMake_BINARY_DIR:PATH=${CMake_BINARY_DIR}"
|
"-DCMake_BINARY_DIR:PATH=${CMake_BINARY_DIR}"
|
||||||
"-DCMake_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}"
|
"-DCMake_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}"
|
||||||
"-DCVS_EXECUTABLE:STRING=${CVS_EXECUTABLE}"
|
"-DCVS_EXECUTABLE:STRING=${CVS_EXECUTABLE}"
|
||||||
|
"-DHOME:STRING=$ENV{HOME}"
|
||||||
)
|
)
|
||||||
AddCMakeTest(CheckSourceTree "${CheckSourceTree_PreArgs}")
|
AddCMakeTest(CheckSourceTree "${CheckSourceTree_PreArgs}")
|
||||||
endif(do_cvs_tests)
|
endif(do_cvs_tests)
|
||||||
|
|
|
@ -6,6 +6,7 @@ message("")
|
||||||
message("CMake_BINARY_DIR='${CMake_BINARY_DIR}'")
|
message("CMake_BINARY_DIR='${CMake_BINARY_DIR}'")
|
||||||
message("CMake_SOURCE_DIR='${CMake_SOURCE_DIR}'")
|
message("CMake_SOURCE_DIR='${CMake_SOURCE_DIR}'")
|
||||||
message("CVS_EXECUTABLE='${CVS_EXECUTABLE}'")
|
message("CVS_EXECUTABLE='${CVS_EXECUTABLE}'")
|
||||||
|
message("HOME='${HOME}'")
|
||||||
message("ENV{DASHBOARD_TEST_FROM_CTEST}='$ENV{DASHBOARD_TEST_FROM_CTEST}'")
|
message("ENV{DASHBOARD_TEST_FROM_CTEST}='$ENV{DASHBOARD_TEST_FROM_CTEST}'")
|
||||||
message("")
|
message("")
|
||||||
|
|
||||||
|
@ -47,18 +48,31 @@ message("=======================================================================
|
||||||
message("Copy/paste this command to reproduce:")
|
message("Copy/paste this command to reproduce:")
|
||||||
message("cd \"${CMake_SOURCE_DIR}\" && \"${CVS_EXECUTABLE}\" -q -n up -dP")
|
message("cd \"${CMake_SOURCE_DIR}\" && \"${CVS_EXECUTABLE}\" -q -n up -dP")
|
||||||
message("")
|
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
|
execute_process(COMMAND ${CVS_EXECUTABLE} -q -n up -dP
|
||||||
WORKING_DIRECTORY ${CMake_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMake_SOURCE_DIR}
|
||||||
OUTPUT_VARIABLE ov
|
OUTPUT_VARIABLE ov
|
||||||
ERROR_VARIABLE ev
|
ERROR_VARIABLE ev
|
||||||
RESULT_VARIABLE rv)
|
RESULT_VARIABLE rv)
|
||||||
|
|
||||||
|
set(ENV{HOME} "${original_ENV_HOME}")
|
||||||
|
|
||||||
message("Results of running '${CVS_EXECUTABLE} -q -n up -dP'")
|
message("Results of running '${CVS_EXECUTABLE} -q -n up -dP'")
|
||||||
message("rv='${rv}'")
|
message("rv='${rv}'")
|
||||||
message("ov='${ov}'")
|
message("ov='${ov}'")
|
||||||
message("ev='${ev}'")
|
message("ev='${ev}'")
|
||||||
message("")
|
message("")
|
||||||
|
|
||||||
|
if(NOT rv STREQUAL 0)
|
||||||
|
message(FATAL_ERROR "error: 'cvs -q -n up -dP' attempt failed... (see output above)")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Analyze cvs output:
|
# Analyze cvs output:
|
||||||
#
|
#
|
||||||
set(additions 0)
|
set(additions 0)
|
||||||
|
|
Loading…
Reference in New Issue