summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2016-09-30 14:35:09 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2016-09-30 14:35:09 (GMT)
commitfe71ac8d0ee13e3ed4656cd84720bd644729b74d (patch)
tree8f6e1d26810c2ccb84f4b35b22d807b74cf6a933 /config
parent30ca70b0969ae0ab63104d7910523818e5385ac6 (diff)
downloadhdf5-fe71ac8d0ee13e3ed4656cd84720bd644729b74d.zip
hdf5-fe71ac8d0ee13e3ed4656cd84720bd644729b74d.tar.gz
hdf5-fe71ac8d0ee13e3ed4656cd84720bd644729b74d.tar.bz2
Fix error reporting
Diffstat (limited to 'config')
-rw-r--r--config/cmake/HDF518_Examples.cmake.in15
-rw-r--r--config/cmake/HDF5_Examples.cmake.in15
-rwxr-xr-xconfig/cmake/scripts/CTestScript.cmake12
3 files changed, 33 insertions, 9 deletions
diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in
index efabbe6..309c1d6 100644
--- a/config/cmake/HDF518_Examples.cmake.in
+++ b/config/cmake/HDF518_Examples.cmake.in
@@ -171,19 +171,28 @@ ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
## NORMAL process
## --------------------------
ctest_start (Experimental)
-ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}")
+ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+if(${res} LESS 0 OR ${res} GREATER 0)
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
+endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Configure Notes)
endif()
-ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND APPEND RETURN_VALUE res NUMBER_ERRORS errval)
+if(${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
+endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Build)
endif()
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
+if(${res} LESS 0 OR ${res} GREATER 0)
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
+endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Test)
endif()
-if(res GREATER 0)
+if(${res} LESS 0 OR ${res} GREATER 0)
message (FATAL_ERROR "tests FAILED")
endif()
#-----------------------------------------------------------------------------
diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in
index 8ea6d18..058dd7a 100644
--- a/config/cmake/HDF5_Examples.cmake.in
+++ b/config/cmake/HDF5_Examples.cmake.in
@@ -182,19 +182,28 @@ ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
## NORMAL process
## --------------------------
ctest_start (Experimental)
-ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}")
+ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+if(${res} LESS 0 OR ${res} GREATER 0)
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
+endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Configure Notes)
endif()
-ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND APPEND RETURN_VALUE res NUMBER_ERRORS errval)
+if(${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
+endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Build)
endif()
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
+if(${res} LESS 0 OR ${res} GREATER 0)
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
+endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Test)
endif()
-if(res GREATER 0)
+if(${res} LESS 0 OR ${res} GREATER 0)
message (FATAL_ERROR "tests FAILED")
endif()
#-----------------------------------------------------------------------------
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index 8a08caa..322f0e5 100755
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -257,12 +257,18 @@ message(STATUS "Dashboard script configuration:\n${vars}\n")
endif()
configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
- ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}")
+ ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+ if(${res} LESS 0 OR ${res} GREATER 0)
+ message(FATAL_ERROR "Failed configure: ${res}\n")
+ endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Update Configure Notes)
endif()
- ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval)
+ if(${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
+ message(FATAL_ERROR "Failed build: ${res} with Errors=${errval}\n")
+ endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Build)
endif()
@@ -273,7 +279,7 @@ message(STATUS "Dashboard script configuration:\n${vars}\n")
if(LOCAL_SUBMIT)
ctest_submit (PARTS Test)
endif()
- if(res GREATER 0)
+ if(${res} LESS 0 OR ${res} GREATER 0)
message(FATAL_ERROR "Failed tests: ${res}\n")
endif()
else()