${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}
)
+ ADD_CUSTOM_TARGET(${_full_test}.build
+ COMMAND ${CMAKE_COMMAND} -E echo "${_full_test}: BUILD successful -------------------"
+ DEPENDS ${_full_test}
+ )
+
#
# Add a top level target to run the test...
#
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_test}/output
- COMMAND ${_full_test}
+ COMMAND
+ ${_full_test}
+ || (echo "Running the test failed with the following partial output:"
+ && cat output
+ && rm output
+ && exit 1)
COMMAND
${PERL_EXECUTABLE} -pi
${CMAKE_SOURCE_DIR}/cmake/scripts/normalize.pl
DEPENDS ${_full_test} ${CMAKE_SOURCE_DIR}/cmake/scripts/normalize.pl
)
+ ADD_CUSTOM_TARGET(${_full_test}.run
+ COMMAND ${CMAKE_COMMAND} -E echo "${_full_test}: RUN successful -------------------"
+ DEPENDS ${_full_test}.build
+ ${CMAKE_CURRENT_BINARY_DIR}/${_test}/output
+ )
+
+
#
# and compare the output:
#
SET(_comparison ${_comparison}.output)
ENDIF()
-
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_test}/diff
COMMAND
# TODO: Refactor...
${CMAKE_CURRENT_BINARY_DIR}/${_test}/output
${_comparison}
> ${CMAKE_CURRENT_BINARY_DIR}/${_test}/diff
- || mv
- ${CMAKE_CURRENT_BINARY_DIR}/${_test}/diff
- ${CMAKE_CURRENT_BINARY_DIR}/${_test}/failing_diff
- COMMAND
- ${DEAL_II_TEST_DIFF}
- ${CMAKE_CURRENT_BINARY_DIR}/${_test}/output
- ${_comparison}
+ || (mv ${CMAKE_CURRENT_BINARY_DIR}/${_test}/diff
+ ${CMAKE_CURRENT_BINARY_DIR}/${_test}/failing_diff
+ && echo ${CMAKE_CURRENT_BINARY_DIR}/${_test}/failing_diff
+ && exit 1)
DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/${_test}/output
${_comparison}
)
ADD_CUSTOM_TARGET(${_full_test}.diff
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_test}/diff
+ COMMAND ${CMAKE_COMMAND} -E echo "${_full_test}: DIFF successful -------------------"
+ DEPENDS ${_full_test}.run
+ ${CMAKE_CURRENT_BINARY_DIR}/${_test}/diff
)
)
IF("${_result_code}" STREQUAL "0")
+
+ MESSAGE("${TEST}: Test successful:")
+ MESSAGE("=============================== OUTPUT BEGIN ===============================")
+ # Do not output everything, just that we are successful:
MESSAGE("${TEST}: BUILD successful")
MESSAGE("${TEST}: RUN successful")
MESSAGE("${TEST}: DIFF successful")
+ MESSAGE("=============================== OUTPUT END ===============================")
ELSE()
- MESSAGE("*** ***")
+ MESSAGE("${TEST}: Test failed:")
+ MESSAGE("=============================== OUTPUT BEGIN ===============================")
MESSAGE(${_output})
- # TODO: Be a bit more verbose ;-)
- MESSAGE("${TEST}: TEST failed")
- MESSAGE("*** ***")
- MESSAGE(FATAL_ERROR "*** Test aborted.")
+ MESSAGE("=============================== OUTPUT END ===============================")
+ MESSAGE(FATAL_ERROR "*** abort")
+
ENDIF()