summaryrefslogtreecommitdiffstats
path: root/Tests/CTestUpdateGIT.cmake.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-11 13:44:05 (GMT)
committerBrad King <brad.king@kitware.com>2015-06-11 14:57:20 (GMT)
commitb6667729cb40dec8aff28464152dfa1b7c92decc (patch)
tree5b4a48d70c2dfe5560dcca6a835c3f139fbbe1cf /Tests/CTestUpdateGIT.cmake.in
parentf9285727dc73365ff190de530a63dffbf725eabd (diff)
downloadCMake-b6667729cb40dec8aff28464152dfa1b7c92decc.zip
CMake-b6667729cb40dec8aff28464152dfa1b7c92decc.tar.gz
CMake-b6667729cb40dec8aff28464152dfa1b7c92decc.tar.bz2
Tests: Simplify CTest.UpdateGIT QUIET mode test
Parameterize the dashboard script generation to configure custom content. Also move state cleanup from previous test back to its block.
Diffstat (limited to 'Tests/CTestUpdateGIT.cmake.in')
-rw-r--r--Tests/CTestUpdateGIT.cmake.in15
1 files changed, 3 insertions, 12 deletions
diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in
index 5987a30..3734e2b 100644
--- a/Tests/CTestUpdateGIT.cmake.in
+++ b/Tests/CTestUpdateGIT.cmake.in
@@ -334,31 +334,22 @@ set(CTEST_UPDATE_VERSION_ONLY TRUE)
# Run the dashboard script with CTest.
set(NO_UPDATE 1)
run_dashboard_script(dash-binary-no-update)
+unset(NO_UPDATE)
rewind_source(dash-source)
#-----------------------------------------------------------------------------
# Test ctest_update(QUIET)
-set(NO_UPDATE 0)
message("Running CTest Dashboard Script (update quietly)...")
+set(ctest_update_args QUIET)
create_dashboard_script(dash-binary-quiet
"# git command configuration
set(CTEST_GIT_COMMAND \"${GIT}\")
set(CTEST_GIT_UPDATE_OPTIONS)
set(CTEST_GIT_UPDATE_CUSTOM \${CTEST_GIT_COMMAND} pull origin master)
")
-
-# We need to modify the created dashboard script to include our "QUIET"
-# option.
-set(filename "${TOP}/dash-binary-quiet.cmake")
-file(READ "${filename}" contents)
-string(REPLACE
- [=[ctest_update(SOURCE ${CTEST_SOURCE_DIRECTORY})]=]
- [=[ctest_update(SOURCE ${CTEST_SOURCE_DIRECTORY} QUIET)]=]
- contents
- "${contents}")
-file(WRITE "${filename}" "${contents}")
+unset(ctest_update_args)
# Run the dashboard script with CTest.
run_dashboard_script(dash-binary-quiet)