From 7960f7541ce3d8d03ce68b0e5a37e67019bbe557 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 26 Feb 2009 09:22:16 -0500 Subject: ENH: Extend CTest.UpdateSVN to test local mods This teaches the test to create local modifications in the work tree before updating. --- Tests/CTestUpdateCVS.cmake.in | 3 +++ Tests/CTestUpdateCommon.cmake | 8 +++++++- Tests/CTestUpdateSVN.cmake.in | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Tests/CTestUpdateCVS.cmake.in b/Tests/CTestUpdateCVS.cmake.in index a0507dd..91672e1 100644 --- a/Tests/CTestUpdateCVS.cmake.in +++ b/Tests/CTestUpdateCVS.cmake.in @@ -102,6 +102,9 @@ run_child( COMMAND ${CVSCMD} up -rRevision1 ) +# Create a modified file. +modify_content(user-source) + #----------------------------------------------------------------------------- # Test updating the user work directory with the command-line interface. message("Running CTest Dashboard Command Line...") diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake index 7b670ae..9b6960f 100644 --- a/Tests/CTestUpdateCommon.cmake +++ b/Tests/CTestUpdateCommon.cmake @@ -110,6 +110,12 @@ function(change_content dir) endfunction(change_content) #----------------------------------------------------------------------------- +# Function to create local modifications before update +function(modify_content dir) + file(APPEND ${TOP}/${dir}/CTestConfig.cmake "# local modification\n") +endfunction(modify_content) + +#----------------------------------------------------------------------------- # Function to write CTestConfiguration.ini content. function(create_build_tree src_dir bin_dir) file(MAKE_DIRECTORY ${TOP}/${bin_dir}) @@ -149,7 +155,7 @@ function(run_dashboard_command_line bin_dir) ) # Verify the updates reported by CTest. - check_updates(${bin_dir} foo.txt bar.txt zot.txt + check_updates(${bin_dir} foo.txt bar.txt zot.txt CTestConfig.cmake subdir/foo.txt subdir/bar.txt) endfunction(run_dashboard_command_line) diff --git a/Tests/CTestUpdateSVN.cmake.in b/Tests/CTestUpdateSVN.cmake.in index 8ff2a3d..4b7e666 100644 --- a/Tests/CTestUpdateSVN.cmake.in +++ b/Tests/CTestUpdateSVN.cmake.in @@ -103,6 +103,9 @@ run_child( COMMAND ${SVNCMD} up -r1 ) +# Create a modified file. +modify_content(user-source) + #----------------------------------------------------------------------------- # Test updating the user work directory with the command-line interface. message("Running CTest Dashboard Command Line...") -- cgit v0.12