This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via cd1010a562140632b542d6dea01f929f35900f63 (commit) via 6529d7f67e05903ca29347c3220a0c91ce1f2905 (commit) from e44ca0b4fd97637a604f2c8786793e1e805f88c1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cd1010a562140632b542d6dea01f929f35900f63 commit cd1010a562140632b542d6dea01f929f35900f63 Merge: e44ca0b 6529d7f Author: Ben Boeckel <ben.boec...@kitware.com> AuthorDate: Mon Jan 3 08:43:28 2011 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Jan 3 08:43:28 2011 -0500 Merge topic 'dev/add_test-working-directory' into next 6529d7f Pass the expected value as the first argument http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6529d7f67e05903ca29347c3220a0c91ce1f2905 commit 6529d7f67e05903ca29347c3220a0c91ce1f2905 Author: Ben Boeckel <ben.boec...@kitware.com> AuthorDate: Mon Jan 3 08:39:22 2011 -0500 Commit: Ben Boeckel <ben.boec...@kitware.com> CommitDate: Mon Jan 3 08:39:22 2011 -0500 Pass the expected value as the first argument When the path has regular expression special characters, the PASS_REGULAR_EXPRESSION value can fail to compile. diff --git a/Tests/TestsWorkingDirectory/CMakeLists.txt b/Tests/TestsWorkingDirectory/CMakeLists.txt index 01e6650..0fef19d 100644 --- a/Tests/TestsWorkingDirectory/CMakeLists.txt +++ b/Tests/TestsWorkingDirectory/CMakeLists.txt @@ -7,46 +7,32 @@ enable_testing() set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin") -add_test(NAME WorkingDirectory1 COMMAND WorkingDirectory) +add_test(NAME WorkingDirectory1 COMMAND WorkingDirectory "${CMAKE_BINARY_DIR}") set_tests_properties(WorkingDirectory1 PROPERTIES WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - PASS_REGULAR_EXPRESSION "Working directory: -->${CMAKE_BINARY_DIR}<--" ) string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${CMAKE_BINARY_DIR}") -add_test(NAME WorkingDirectory2 COMMAND WorkingDirectory) +add_test(NAME WorkingDirectory2 COMMAND WorkingDirectory "${_parent_dir}") set_tests_properties(WorkingDirectory2 PROPERTIES WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/.." - PASS_REGULAR_EXPRESSION "Working directory: -->${_parent_dir}<--" ) get_filename_component(_default_cwd "${EXECUTABLE_OUTPUT_PATH}" PATH) # FIXME: How to deal with /debug, /release, etc. with VS or XCode? if(${CMAKE_GENERATOR} MATCHES "Makefiles") -add_test(WorkingDirectory3 ${EXECUTABLE_OUTPUT_PATH}/WorkingDirectory) -set_tests_properties(WorkingDirectory3 PROPERTIES - PASS_REGULAR_EXPRESSION "Working directory: -->${_default_cwd}<--" -) +add_test(WorkingDirectory3 ${EXECUTABLE_OUTPUT_PATH}/WorkingDirectory ${_default_cwd}) endif() -add_test(NAME WorkingDirectory4 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND WorkingDirectory) -set_tests_properties(WorkingDirectory4 PROPERTIES - PASS_REGULAR_EXPRESSION "Working directory: -->${CMAKE_BINARY_DIR}<--" -) +add_test(NAME WorkingDirectory4 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND WorkingDirectory ${CMAKE_BINARY_DIR}) string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${CMAKE_BINARY_DIR}") -add_test(NAME WorkingDirectory5 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/.. COMMAND WorkingDirectory) -set_tests_properties(WorkingDirectory5 PROPERTIES - PASS_REGULAR_EXPRESSION "Working directory: -->${_parent_dir}<--" -) +add_test(NAME WorkingDirectory5 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/.. COMMAND WorkingDirectory ${_parent_dir}) # FIXME: How to deal with /debug, /release, etc. with VS or XCode? if(${CMAKE_GENERATOR} MATCHES "Makefiles") -add_test(WorkingDirectory6 ${EXECUTABLE_OUTPUT_PATH}/WorkingDirectory WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..) -set_tests_properties(WorkingDirectory6 PROPERTIES - PASS_REGULAR_EXPRESSION "Working directory: -->${_default_cwd}<--" -) +add_test(WorkingDirectory6 ${EXECUTABLE_OUTPUT_PATH}/WorkingDirectory ${_default_cwd} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..) endif() diff --git a/Tests/TestsWorkingDirectory/main.c b/Tests/TestsWorkingDirectory/main.c index ad5eb30..19f2f14 100644 --- a/Tests/TestsWorkingDirectory/main.c +++ b/Tests/TestsWorkingDirectory/main.c @@ -60,7 +60,5 @@ int main(int argc, char *argv[]) char buf[2048]; const char *cwd = Getcwd(buf, sizeof(buf)); - fprintf(stdout, "Working directory: -->%s<--", cwd); - - return 0; + return strcmp(cwd, argv[1]); } ----------------------------------------------------------------------- Summary of changes: Tests/TestsWorkingDirectory/CMakeLists.txt | 26 ++++++-------------------- Tests/TestsWorkingDirectory/main.c | 4 +--- 2 files changed, 7 insertions(+), 23 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits