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 | 52d119088373c4aa34cbb0564bcbe452b92044b5 (patch) | |
tree | db1ec1dd710c09c2e1db34aeb8a0675b5f3393ca /bin/cmakehdf5 | |
parent | 4ae0c873e0ce24209ad00324dfc7fea94e22008d (diff) | |
download | hdf5-52d119088373c4aa34cbb0564bcbe452b92044b5.zip hdf5-52d119088373c4aa34cbb0564bcbe452b92044b5.tar.gz hdf5-52d119088373c4aa34cbb0564bcbe452b92044b5.tar.bz2 |
[svn-r23449] Update script for reporting errors from configure, build, test.
Tested: jam
Diffstat (limited to 'bin/cmakehdf5')
-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) |