#
- # Add a top level target to run the test and compare the output:
+ # Add a top level target to run the test...
#
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_test}/output
COMMAND ${_full_test}
DEPENDS ${_full_test} ${CMAKE_SOURCE_DIR}/cmake/scripts/normalize.pl
)
+ #
+ # and compare the output:
+ #
SET(_comparison ${CMAKE_CURRENT_SOURCE_DIR}/${_test_name})
IF(EXISTS ${_comparison}.${_build_lowercase}.output)
SET(_comparison ${_comparison}.${_build_lowercase}.output)
SET(_comparison ${_comparison}.output)
ENDIF()
- ADD_CUSTOM_TARGET(${_full_test}.diff
+
+ ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_test}/diff
+ COMMAND
+ # TODO: Refactor...
+ ${DEAL_II_TEST_DIFF}
+ ${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}
- > ${CMAKE_CURRENT_BINARY_DIR}/${_test}/diff
DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/${_test}/output
${_comparison}
)
+ ADD_CUSTOM_TARGET(${_full_test}.diff
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_test}/diff
+ )
#
)
IF("${_result_code}" STREQUAL "0")
- MESSAGE("*** ***")
- MESSAGE("${TEST}: Diff successful")
- MESSAGE(${_output})
- MESSAGE("*** ***")
+ MESSAGE("${TEST}: BUILD successful")
+ MESSAGE("${TEST}: RUN successful")
+ MESSAGE("${TEST}: DIFF successful")
ELSE()
- MESSAGE("*** ***")
- MESSAGE("${TEST}: Diff failed:")
+ MESSAGE("*** ***")
MESSAGE(${_output})
- MESSAGE("*** ***")
+ # TODO: Be a bit more verbose ;-)
+ MESSAGE("${TEST}: TEST failed")
+ MESSAGE("*** ***")
MESSAGE(FATAL_ERROR "*** Test aborted.")
ENDIF()