hdf5/bin/batch/ctest_parallel.cmake.in
Larry Knox 6924d590cc
Use ctest_test and APPEND to correctly report passed and failed test numbers in CDash (#2208)
* Change how HPC tests are executed

* Move ctest_test commands for serial and parallel tests into cmake files.

* Update checks for uploading Test.xml to CDash.

* Correct cmake scripots.

* Remove extraneous characters.

* Add ctest_start (APPEND).

* Add binary directories to scripts running ctest_test.

* Correct parameters for appending Test.xml.

* Set CTEST_SITE and CTEST_BUILD_NAME.

* Try to pass site and build_name to ctest_test sripts.

* Add site name and build name for ctest_test commands vi environment.

* Revert "Try to pass site and build_name to ctest_test sripts."

This reverts commit d364aaf0fa.

* Correct typo in src/CMakeLists.txt.

* Update batch scripts to run ctest_test scripts.

Co-authored-by: Allen Byrne <byrn@hdfgroup.org>
2022-11-02 09:02:47 -07:00

13 lines
485 B
CMake

if(NOT "$ENV{CI_SITE_NAME}" STREQUAL "")
set(CTEST_SITE "$ENV{CI_SITE_NAME}")
endif()
if(NOT "$ENV{CI_BUILD_NAME}" STREQUAL "")
set(CTEST_BUILD_NAME "$ENV{CI_BUILD_NAME}")
endif()
ctest_start ("$ENV{CI_MODEL}" "@HDF5_SOURCE_DIR@" "@HDF5_BINARY_DIR@" APPEND)
ctest_test (BUILD "@HDF5_BINARY_DIR@" APPEND INCLUDE MPI_TEST_ RETURN_VALUE res)
if (${res} LESS 0 OR ${res} GREATER 0)
file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
endif ()