Fail RunUnittests if we get a non-zero exit code from busted.

This commit is contained in:
John Szakmeister 2014-03-25 13:04:33 -04:00
parent 7d413050ba
commit f9aeb219c1

View File

@ -6,4 +6,9 @@ set(ENV{TEST_INCLUDES} ${TEST_INCLUDES})
execute_process(
COMMAND ${BUSTED_PRG} -l ${LUAJIT_PRG} -o ${BUSTED_OUTPUT_TYPE}
--pattern=.moon ${TEST_DIR}
WORKING_DIRECTORY ${WORKING_DIR})
WORKING_DIRECTORY ${WORKING_DIR}
RESULT_VARIABLE res)
if(NOT res EQUAL 0)
message(FATAL_ERROR "Unit tests failed.")
endif()