diff options
Diffstat (limited to 'config')
-rwxr-xr-x | config/cmake/scripts/CTestScript.cmake | 97 | ||||
-rwxr-xr-x | config/cmake/scripts/wait_H5Tinit.cmake | 11 |
2 files changed, 71 insertions, 37 deletions
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index a3f2229..9534b1e 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -267,41 +267,64 @@ message (STATUS "Dashboard script configuration:\n${vars}\n") if (NOT LOCAL_BATCH_TEST) ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) else () - execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_NAME}) + file(STRINGS ${CTEST_BINARY_DIRECTORY}/Testing/TAG TAG_CONTENTS REGEX "^2([0-9]+)[-]([0-9]+)$") + execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_SOURCE_DIRECTORY}/bin/batch/${LOCAL_BATCH_SCRIPT_NAME}) + message(STATUS "Check for existence of ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml") + execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET) + while(result) + ctest_sleep(60) + execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET) + endwhile(result) + if (LOCAL_BATCH_SCRIPT_PARALLEL_NAME) + if (LOCAL_SUBMIT) + ctest_submit (PARTS Test) + endif () + message(STATUS "Found ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml for serial tests. Renaming to SerialTest.xml") + file (RENAME ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/SerialTest.xml) + unset(result CACHE) + execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_SOURCE_DIRECTORY}/bin/batch/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}) + message(STATUS "Check for existence of ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml") + execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET) + while(result) + ctest_sleep(60) + execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET) + endwhile(result) + message(STATUS "Found ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml for parallel tests.") + endif() endif () - if (LOCAL_SUBMIT)
- ctest_submit (PARTS Test)
- endif ()
- if (${res} LESS 0 OR ${res} GREATER 0)
- file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
- endif ()
- else ()
- ctest_memcheck (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
- if (LOCAL_SUBMIT)
- ctest_submit (PARTS MemCheck)
- endif ()
- endif ()
- if (LOCAL_COVERAGE_TEST)
- ctest_coverage (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
- if (LOCAL_SUBMIT)
- ctest_submit (PARTS Coverage)
- endif ()
- endif ()
- endif ()
-
- if (NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
- ##-----------------------------------------------
- ## Package the product
- ##-----------------------------------------------
- execute_process (COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
- WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
- RESULT_VARIABLE cpackResult
- OUTPUT_VARIABLE cpackLog
- ERROR_VARIABLE cpackLog.err
- )
- file (WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
- if (cpackResult GREATER 0)
- file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
- endif ()
- endif ()
-#-----------------------------------------------------------------------------
+ if (LOCAL_SUBMIT) + ctest_submit (PARTS Test) + endif () + if (${res} LESS 0 OR ${res} GREATER 0) + file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n") + endif () + else () + ctest_memcheck (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args}) + if (LOCAL_SUBMIT) + ctest_submit (PARTS MemCheck) + endif () + endif () + if (LOCAL_COVERAGE_TEST) + ctest_coverage (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND) + if (LOCAL_SUBMIT) + ctest_submit (PARTS Coverage) + endif () + endif () + endif () + + if (NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD) + ##----------------------------------------------- + ## Package the product + ##----------------------------------------------- + execute_process (COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V + WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY} + RESULT_VARIABLE cpackResult + OUTPUT_VARIABLE cpackLog + ERROR_VARIABLE cpackLog.err + ) + file (WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}") + if (cpackResult GREATER 0) + file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n") + endif () + endif () +#----------------------------------------------------------------------------- diff --git a/config/cmake/scripts/wait_H5Tinit.cmake b/config/cmake/scripts/wait_H5Tinit.cmake new file mode 100755 index 0000000..c0b4d06 --- /dev/null +++ b/config/cmake/scripts/wait_H5Tinit.cmake @@ -0,0 +1,11 @@ +cmake_minimum_required (VERSION 3.10) + +message(STATUS "Check for existence of ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c") +execute_process(COMMAND ls ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c RESULT_VARIABLE H5TI_result OUTPUT_QUIET ERROR_QUIET) +while(H5TI_result) + ctest_sleep(30) + message(STATUS "Checking again for existence of ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c") + execute_process(COMMAND ls ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c RESULT_VARIABLE H5TI_result OUTPUT_QUIET ERROR_QUIET) +endwhile(H5TI_result) +file (TOUCH "${HDF5_BINARY_DIR}/H5Tinit_created") +message(STATUS "Found ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c") |