summaryrefslogtreecommitdiffstats
path: root/Tests/CTestUpdateGIT.cmake.in
diff options
context:
space:
mode:
authorZack Galbreath <zack.galbreath@kitware.com>2015-02-17 16:45:46 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-23 15:01:59 (GMT)
commit645ad117e1c8b3b99fda128daad708a87c0a3f2e (patch)
tree7a8c3cbccd0cdc6db300ddfb7a8e5936b95d20d4 /Tests/CTestUpdateGIT.cmake.in
parent19d1a5599a08f2e8d74c4483cb9ee6d34e38ecba (diff)
downloadCMake-645ad117e1c8b3b99fda128daad708a87c0a3f2e.zip
CMake-645ad117e1c8b3b99fda128daad708a87c0a3f2e.tar.gz
CMake-645ad117e1c8b3b99fda128daad708a87c0a3f2e.tar.bz2
ctest_update: Add QUIET option
Diffstat (limited to 'Tests/CTestUpdateGIT.cmake.in')
-rw-r--r--Tests/CTestUpdateGIT.cmake.in33
1 files changed, 33 insertions, 0 deletions
diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in
index 41b732b..5987a30 100644
--- a/Tests/CTestUpdateGIT.cmake.in
+++ b/Tests/CTestUpdateGIT.cmake.in
@@ -334,3 +334,36 @@ set(CTEST_UPDATE_VERSION_ONLY TRUE)
# Run the dashboard script with CTest.
set(NO_UPDATE 1)
run_dashboard_script(dash-binary-no-update)
+
+rewind_source(dash-source)
+
+#-----------------------------------------------------------------------------
+# Test ctest_update(QUIET)
+set(NO_UPDATE 0)
+message("Running CTest Dashboard Script (update quietly)...")
+
+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}")
+
+# Run the dashboard script with CTest.
+run_dashboard_script(dash-binary-quiet)
+
+# Make sure the output seems quiet.
+if("${OUTPUT}" MATCHES "Updating the repository")
+ message(FATAL_ERROR "Found 'Updating the repository' in quiet output")
+endif()