diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-03-25 19:22:10 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-03-25 19:22:10 (GMT) |
commit | d3c5fd31a09906a84f79933f331504ea5f8512a7 (patch) | |
tree | ff8e754bb66f6b00c17af02f9d35ec41d121623f | |
parent | b93cec6dc4f547662e3910d24054bde056290713 (diff) | |
download | hdf5-d3c5fd31a09906a84f79933f331504ea5f8512a7.zip hdf5-d3c5fd31a09906a84f79933f331504ea5f8512a7.tar.gz hdf5-d3c5fd31a09906a84f79933f331504ea5f8512a7.tar.bz2 |
[svn-r23449] 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) |