2014-03-03 08:09:06 -07:00
|
|
|
get_filename_component(BUSTED_DIR ${BUSTED_PRG} PATH)
|
|
|
|
set(ENV{PATH} "${BUSTED_DIR}:$ENV{PATH}")
|
|
|
|
set(ENV{NVIM_TEST_LIB} ${NVIM_TEST_LIB})
|
|
|
|
set(ENV{TEST_INCLUDES} ${TEST_INCLUDES})
|
2014-04-23 01:48:22 -07:00
|
|
|
if(DEFINED ENV{TEST_FILE})
|
|
|
|
set(TEST_DIR $ENV{TEST_FILE})
|
|
|
|
endif()
|
2014-03-03 08:09:06 -07:00
|
|
|
|
|
|
|
execute_process(
|
2014-04-14 12:46:16 -07:00
|
|
|
COMMAND ${BUSTED_PRG} -o ${BUSTED_OUTPUT_TYPE} --pattern=.moon ${TEST_DIR}
|
2014-03-25 10:04:33 -07:00
|
|
|
WORKING_DIRECTORY ${WORKING_DIR}
|
|
|
|
RESULT_VARIABLE res)
|
|
|
|
|
|
|
|
if(NOT res EQUAL 0)
|
|
|
|
message(FATAL_ERROR "Unit tests failed.")
|
|
|
|
endif()
|