Skip to content
Snippets Groups Projects
Commit 22e105a8 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Add support for no_submit and submit_only in the common dashboard script.

parent a4b914cd
No related branches found
No related tags found
1 merge request!286Add summitdev scripts
......@@ -40,6 +40,8 @@
# dashboard_do_test = True to enable the Test step
# dashboard_do_coverage = True to enable coverage (ex: gcov)
# dashboard_do_memcheck = True to enable memcheck (ex: valgrind)
# dashboard_do_submit = Submit each step (ON)
# dashboard_do_submit_only = Only submit step results, do nto run them (OFF)
# CTEST_GIT_COMMAND = path to git command-line client
# CTEST_BUILD_FLAGS = build tool arguments (ex: -j2)
......@@ -107,6 +109,14 @@ if(NOT DEFINED dashboard_fresh)
endif()
endif()
if(NOT DEFINED dashboard_do_submit_only)
set(dashboard_do_submit_only FALSE)
endif()
if(NOT DEFINED dashboard_do_submit)
set(dashboard_do_submit TRUE)
endif()
if(NOT DEFINED CTEST_PROJECT_NAME)
message(FATAL_ERROR "project-specific script including 'universal.cmake' should set CTEST_PROJECT_NAME")
endif()
......@@ -367,7 +377,9 @@ if(dashboard_fresh)
dashboard_hook_start()
endif()
ctest_start(${dashboard_model} ${dashboard_track_arg})
ctest_submit(PARTS Start)
if(dashboard_do_submit)
ctest_submit(PARTS Start)
endif()
if(COMMAND dashboard_hook_started)
dashboard_hook_started()
endif()
......@@ -377,85 +389,109 @@ endif()
# Look for updates.
if(dashboard_do_update)
if(COMMAND dashboard_hook_update)
dashboard_hook_update()
if(NOT dashboard_do_submit_only)
if(COMMAND dashboard_hook_update)
dashboard_hook_update()
endif()
message("Calling ctest_update...")
ctest_update(RETURN_VALUE count)
set(CTEST_CHECKOUT_COMMAND) # checkout on first iteration only
message("Found ${count} changed files")
endif()
message("Calling ctest_update...")
ctest_update(RETURN_VALUE count)
set(CTEST_CHECKOUT_COMMAND) # checkout on first iteration only
message("Found ${count} changed files")
if(ADIOS_CTEST_SUBMIT_NOTES)
message("Submitting dashboard scripts as Notes")
# Send the main script as a note while submitting the Update part
set(CTEST_NOTES_FILES
"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
"${CMAKE_CURRENT_LIST_FILE}"
)
ctest_submit(PARTS Update Notes)
else()
message("Skipping notes submission for Update step")
ctest_submit(PARTS Update)
if(dashboard_do_submit)
if(ADIOS_CTEST_SUBMIT_NOTES)
message("Submitting dashboard scripts as Notes")
# Send the main script as a note while submitting the Update part
set(CTEST_NOTES_FILES
"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
"${CMAKE_CURRENT_LIST_FILE}"
)
ctest_submit(PARTS Update Notes)
else()
message("Skipping notes submission for Update step")
ctest_submit(PARTS Update)
endif()
endif()
endif()
if(dashboard_do_configure)
if(COMMAND dashboard_hook_configure)
dashboard_hook_configure()
if(NOT dashboard_do_submit_only)
if(COMMAND dashboard_hook_configure)
dashboard_hook_configure()
endif()
message("Calling ctest_configure")
ctest_configure(${dashboard_configure_args})
endif()
message("Calling ctest_configure")
ctest_configure(${dashboard_configure_args})
if(ADIOS_CTEST_SUBMIT_NOTES)
message("Submitting CMakeCache.txt as Notes")
set(CTEST_NOTES_FILES "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
ctest_submit(PARTS Configure Notes)
else()
message("Skipping notes submission for Configure step")
ctest_submit(PARTS Configure)
if(dashboard_do_submit)
if(ADIOS_CTEST_SUBMIT_NOTES)
message("Submitting CMakeCache.txt as Notes")
set(CTEST_NOTES_FILES "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
ctest_submit(PARTS Configure Notes)
else()
message("Skipping notes submission for Configure step")
ctest_submit(PARTS Configure)
endif()
endif()
endif()
ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})
if(dashboard_do_build)
if(COMMAND dashboard_hook_build)
dashboard_hook_build()
if(NOT dashboard_do_submit_only)
if(COMMAND dashboard_hook_build)
dashboard_hook_build()
endif()
message("Calling ctest_build")
ctest_build()
endif()
if(dashboard_do_submit)
ctest_submit(PARTS Build)
endif()
message("Calling ctest_build")
ctest_build()
ctest_submit(PARTS Build)
endif()
if(dashboard_do_test)
if(COMMAND dashboard_hook_test)
dashboard_hook_test()
if(NOT dashboard_do_submit_only)
if(COMMAND dashboard_hook_test)
dashboard_hook_test()
endif()
message("Calling ctest_test")
ctest_test(${CTEST_TEST_ARGS} RETURN_VALUE TEST_RESULTS)
if(${TEST_RESULTS} EQUAL 0)
message("ctest test results return value: ${TEST_RESULTS}")
else()
message(SEND_ERROR "Some tests failed")
endif()
endif()
message("Calling ctest_test")
ctest_test(${CTEST_TEST_ARGS} RETURN_VALUE TEST_RESULTS)
if(${TEST_RESULTS} EQUAL 0)
message("ctest test results return value: ${TEST_RESULTS}")
else()
message(SEND_ERROR "Some tests failed")
if(dashboard_do_submit)
ctest_submit(PARTS Test)
endif()
ctest_submit(PARTS Test)
endif()
if(dashboard_do_coverage)
if(COMMAND dashboard_hook_coverage)
dashboard_hook_coverage()
if(NOT dashboard_do_submit_only)
if(COMMAND dashboard_hook_coverage)
dashboard_hook_coverage()
endif()
message("Calling ctest_coverage")
ctest_coverage()
endif()
if(dashboard_do_submit)
ctest_submit(PARTS Coverage)
endif()
message("Calling ctest_coverage")
ctest_coverage()
ctest_submit(PARTS Coverage)
endif()
if(dashboard_do_memcheck)
if(COMMAND dashboard_hook_memcheck)
dashboard_hook_memcheck()
if(NOT dashboard_do_submit_only)
if(COMMAND dashboard_hook_memcheck)
dashboard_hook_memcheck()
endif()
message("Calling ctest_memcheck")
ctest_memcheck()
endif()
if(dashboard_do_submit)
ctest_submit(PARTS MemCheck)
endif()
message("Calling ctest_memcheck")
ctest_memcheck()
ctest_submit(PARTS MemCheck)
endif()
if(COMMAND dashboard_hook_end)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment