summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-11 13:51:08 (GMT)
committerBrad King <brad.king@kitware.com>2015-06-11 14:57:32 (GMT)
commitbcf258032fe79c75965722f25ec5f76ff472a19c (patch)
tree3c392dea3ebcb37945fb18ea5bb9d9d617360415 /Tests
parentb6667729cb40dec8aff28464152dfa1b7c92decc (diff)
downloadCMake-bcf258032fe79c75965722f25ec5f76ff472a19c.zip
CMake-bcf258032fe79c75965722f25ec5f76ff472a19c.tar.gz
CMake-bcf258032fe79c75965722f25ec5f76ff472a19c.tar.bz2
Tests: Teach CTest.Update* tests to check ctest_update return code
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CTestUpdateCommon.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index 0bb2d30..df1a713 100644
--- a/Tests/CTestUpdateCommon.cmake
+++ b/Tests/CTestUpdateCommon.cmake
@@ -182,6 +182,14 @@ endfunction()
#-----------------------------------------------------------------------------
# Function to write the dashboard test script.
function(create_dashboard_script bin_dir custom_text)
+ if (NOT ctest_update_check)
+ set(ctest_update_check [[
+if(ret LESS 0)
+ message(FATAL_ERROR "ctest_update failed with ${ret}")
+endif()
+]])
+ endif()
+
# Write the dashboard script.
file(WRITE ${TOP}/${bin_dir}.cmake
"# CTest Dashboard Script
@@ -193,8 +201,8 @@ set(CTEST_BINARY_DIRECTORY \${CTEST_DASHBOARD_ROOT}/${bin_dir})
${custom_text}
# Start a dashboard and run the update step
ctest_start(Experimental)
-ctest_update(SOURCE \${CTEST_SOURCE_DIRECTORY} ${ctest_update_args})
-")
+ctest_update(SOURCE \${CTEST_SOURCE_DIRECTORY} RETURN_VALUE ret ${ctest_update_args})
+${ctest_update_check}")
endfunction()
#-----------------------------------------------------------------------------