diff options
Diffstat (limited to 'Tests/CTestUpdateCVS.cmake.in')
-rw-r--r-- | Tests/CTestUpdateCVS.cmake.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/CTestUpdateCVS.cmake.in b/Tests/CTestUpdateCVS.cmake.in index 1699c3f..277b3a6 100644 --- a/Tests/CTestUpdateCVS.cmake.in +++ b/Tests/CTestUpdateCVS.cmake.in @@ -170,3 +170,22 @@ set(CTEST_CHECKOUT_COMMAND # Run the dashboard script with CTest. run_dashboard_script(dash-binary) + +#----------------------------------------------------------------------------- +# Test ctest_update(RETURN_VALUE) on failure +message("Running CTest Dashboard Script (fail to update)...") + +set(ctest_update_check [[ +if(NOT ret LESS 0) + message(FATAL_ERROR "ctest_update incorrectly succeeded with ${ret}") +endif() +]]) +create_dashboard_script(dash-binary-fail + "set(CTEST_CVS_COMMAND \"update-command-does-not-exist\") +") +unset(ctest_update_check) + +# Run the dashboard script with CTest. +set(FAIL_UPDATE 1) +run_dashboard_script(dash-binary-fail) +unset(FAIL_UPDATE) |