diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-03-25 21:38:42 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-03-25 21:38:42 (GMT) |
commit | bda2e5da5af056752db021fbb861ea95d30c6afd (patch) | |
tree | 5bf7b1bf64bc5b0226bd05940233f4bbcebf7841 | |
parent | cfbbd9462707db9f7fde6b8f8adf8936d05cffe4 (diff) | |
download | hdf5-bda2e5da5af056752db021fbb861ea95d30c6afd.zip hdf5-bda2e5da5af056752db021fbb861ea95d30c6afd.tar.gz hdf5-bda2e5da5af056752db021fbb861ea95d30c6afd.tar.bz2 |
[svn-r23454] Update script for reporting errors from configure, build, test.
Tested: jam
-rwxr-xr-x | bin/cmakehdf5 | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5 index c024ad1..2480497 100755 --- a/bin/cmakehdf5 +++ b/bin/cmakehdf5 @@ -70,6 +70,7 @@ set (CTEST_SOURCE_DIRECTORY "../hdf5") set (CTEST_BINARY_DIRECTORY ".") set (CTEST_CMAKE_GENERATOR "Unix Makefiles") set (CTEST_BUILD_CONFIGURATION "Release") +set (CTEST_MAX_N 8) # -- CDash variables set (LOCAL_NO_SUBMIT TRUE) # No CDash submit. @@ -87,6 +88,9 @@ set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5.1.8 -DHDF5_A include(ProcessorCount) ProcessorCount(N) if(NOT N EQUAL 0) + if(N GREATER ${CTEST_MAX_N}) + set(N ${CTEST_MAX_N}) + endif(N GREATER ${CTEST_MAX_N}) set(CTEST_BUILD_FLAGS -j${N}) set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) endif() @@ -188,22 +192,31 @@ CTEST_START (${MODEL} TRACK ${MODEL}) if (NOT LOCAL_SKIP_UPDATE) CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}") endif (NOT LOCAL_SKIP_UPDATE) -CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}") +CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) +if(NOT res STREQUAL "0") + message (FATAL_ERROR "Configure FAILED") +endif() message ("Configure DONE") CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}") if (NOT LOCAL_NO_SUBMIT) CTEST_SUBMIT (PARTS Update Configure Notes) endif (NOT LOCAL_NO_SUBMIT) -CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND) +CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res) if (NOT LOCAL_NO_SUBMIT) CTEST_SUBMIT (PARTS Build) endif (NOT LOCAL_NO_SUBMIT) +if(NOT res STREQUAL "0") + message (FATAL_ERROR "Build FAILED") +endif() message ("build DONE") if (NOT LOCAL_SKIP_TEST) - CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND) + CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) if (NOT LOCAL_NO_SUBMIT) CTEST_SUBMIT (PARTS Test) endif (NOT LOCAL_NO_SUBMIT) + if(NOT res STREQUAL "0") + message (FATAL_ERROR "Test FAILED") + endif() message ("test DONE") endif (NOT LOCAL_SKIP_TEST) |