summaryrefslogtreecommitdiff
path: root/Tests/CTestUpdateCommon.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-06-08 15:58:39 -0400
committerBrad King <brad.king@kitware.com>2010-06-08 15:58:39 -0400
commit11bdc2b1a13f8bd435cdee271ce435cf533e1aa8 (patch)
tree3396e6ccc36d1477911daeb17b3f3c9005f63eed /Tests/CTestUpdateCommon.cmake
parent6f9bb934d41912ee0e9beb6a34edecf5667f0fe5 (diff)
downloadcmake-11bdc2b1a13f8bd435cdee271ce435cf533e1aa8.tar.gz
Generalize CTest.Update* test dashboard script helpers
Teach (create|run)_dashboard_script macros to treat the argument as the name of a build tree. Append '.cmake' to generate the dashboard script name. This allows future re-use of the macros for multiple test scripts.
Diffstat (limited to 'Tests/CTestUpdateCommon.cmake')
-rw-r--r--Tests/CTestUpdateCommon.cmake12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index 266f4b3bd5..c62505c8f5 100644
--- a/Tests/CTestUpdateCommon.cmake
+++ b/Tests/CTestUpdateCommon.cmake
@@ -165,15 +165,15 @@ endfunction(create_build_tree)
#-----------------------------------------------------------------------------
# Function to write the dashboard test script.
-function(create_dashboard_script name custom_text)
+function(create_dashboard_script bin_dir custom_text)
# Write the dashboard script.
- file(WRITE ${TOP}/dashboard.cmake
+ file(WRITE ${TOP}/${bin_dir}.cmake
"# CTest Dashboard Script
set(CTEST_DASHBOARD_ROOT \"${TOP}\")
set(CTEST_SITE test.site)
set(CTEST_BUILD_NAME dash-test)
set(CTEST_SOURCE_DIRECTORY \${CTEST_DASHBOARD_ROOT}/dash-source)
-set(CTEST_BINARY_DIRECTORY \${CTEST_DASHBOARD_ROOT}/dash-binary)
+set(CTEST_BINARY_DIRECTORY \${CTEST_DASHBOARD_ROOT}/${bin_dir})
${custom_text}
# Start a dashboard and run the update step
ctest_start(Experimental)
@@ -203,15 +203,15 @@ endfunction(run_dashboard_command_line)
#-----------------------------------------------------------------------------
# Function to run the dashboard through a script
-function(run_dashboard_script name)
+function(run_dashboard_script bin_dir)
run_child(
WORKING_DIRECTORY ${TOP}
- COMMAND ${CMAKE_CTEST_COMMAND} -S ${name} -V
+ COMMAND ${CMAKE_CTEST_COMMAND} -S ${bin_dir}.cmake -V
)
# Verify the updates reported by CTest.
list(APPEND UPDATE_MAYBE Updated{subdir})
- check_updates(dash-binary
+ check_updates(${bin_dir}
Updated{foo.txt}
Updated{bar.txt}
Updated{zot.txt}