Fix to bug 704: http://bugs.mariadb.com/show_bug.cgi?id=704
The testall target now exits with the correct value.
This commit is contained in:
@ -185,9 +185,7 @@ add_custom_target(testall
|
|||||||
COMMAND ${CMAKE_COMMAND} -DDEPS_OK=Y -DBUILD_TESTS=Y -DBUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR} -DINSTALL_SYSTEM_FILES=N ${CMAKE_SOURCE_DIR}
|
COMMAND ${CMAKE_COMMAND} -DDEPS_OK=Y -DBUILD_TESTS=Y -DBUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR} -DINSTALL_SYSTEM_FILES=N ${CMAKE_SOURCE_DIR}
|
||||||
COMMAND make install
|
COMMAND make install
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/server/test/MaxScale_test.cnf ${CMAKE_BINARY_DIR}/etc/MaxScale.cnf
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/server/test/MaxScale_test.cnf ${CMAKE_BINARY_DIR}/etc/MaxScale.cnf
|
||||||
COMMAND /bin/sh -c "${CMAKE_BINARY_DIR}/bin/maxscale -c ${CMAKE_BINARY_DIR} &>/dev/null"
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/testall.cmake
|
||||||
COMMAND /bin/sh -c "make test || echo \"Test results written to: ${CMAKE_BINARY_DIR}/Testing/Temporary/\""
|
|
||||||
COMMAND killall maxscale
|
|
||||||
COMMENT "Running full test suite..." VERBATIM)
|
COMMENT "Running full test suite..." VERBATIM)
|
||||||
|
|
||||||
# uninstall target
|
# uninstall target
|
||||||
|
8
testall.cmake
Normal file
8
testall.cmake
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
execute_process(COMMAND /bin/sh -c "${CMAKE_BINARY_DIR}/bin/maxscale -c ${CMAKE_BINARY_DIR} &>/dev/null")
|
||||||
|
execute_process(COMMAND make test RESULT_VARIABLE RVAL)
|
||||||
|
execute_process(COMMAND killall maxscale)
|
||||||
|
if(NOT RVAL EQUAL 0)
|
||||||
|
message(FATAL_ERROR "Test suite failed with status: ${RVAL}")
|
||||||
|
else()
|
||||||
|
message(STATUS "Test exited with status: ${RVAL}")
|
||||||
|
endif()
|
Reference in New Issue
Block a user