summaryrefslogtreecommitdiffstats
path: root/bin/batch/ctest_serial.cmake.in
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2022-11-02 16:02:47 (GMT)
committerGitHub <noreply@github.com>2022-11-02 16:02:47 (GMT)
commit6924d590cc9cead8e250cb7d70f8d18f4da46a07 (patch)
tree051b418f36828eb3b9bc48af821ef951f29113a0 /bin/batch/ctest_serial.cmake.in
parente4fb9aa96ef805e2dada8a78c32aab8cf8c34f4a (diff)
downloadhdf5-6924d590cc9cead8e250cb7d70f8d18f4da46a07.zip
hdf5-6924d590cc9cead8e250cb7d70f8d18f4da46a07.tar.gz
hdf5-6924d590cc9cead8e250cb7d70f8d18f4da46a07.tar.bz2
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 d364aaf0fa65ee7f9e222b2633ee916d50afbc42. * Correct typo in src/CMakeLists.txt. * Update batch scripts to run ctest_test scripts. Co-authored-by: Allen Byrne <byrn@hdfgroup.org>
Diffstat (limited to 'bin/batch/ctest_serial.cmake.in')
-rw-r--r--bin/batch/ctest_serial.cmake.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/batch/ctest_serial.cmake.in b/bin/batch/ctest_serial.cmake.in
new file mode 100644
index 0000000..e54421b
--- /dev/null
+++ b/bin/batch/ctest_serial.cmake.in
@@ -0,0 +1,12 @@
+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 EXCLUDE MPI_TEST_ PARALLEL_LEVEL 32 RETURN_VALUE res)
+if (${res} LESS 0 OR ${res} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
+ endif ()