mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
2dc69700ec
- Unittest should contain substring '_spec' in filename. - This is the simplest way to use both lua and moonscript tests. - This prevents running of non-test scripts from test folder.
15 lines
400 B
CMake
15 lines
400 B
CMake
get_filename_component(BUSTED_DIR ${BUSTED_PRG} PATH)
|
|
set(ENV{PATH} "${BUSTED_DIR}:$ENV{PATH}")
|
|
if(DEFINED ENV{TEST_FILE})
|
|
set(TEST_DIR $ENV{TEST_FILE})
|
|
endif()
|
|
|
|
execute_process(
|
|
COMMAND ${BUSTED_PRG} -o ${BUSTED_OUTPUT_TYPE} --lpath=${BUILD_DIR}/?.lua ${TEST_DIR}
|
|
WORKING_DIRECTORY ${WORKING_DIR}
|
|
RESULT_VARIABLE res)
|
|
|
|
if(NOT res EQUAL 0)
|
|
message(FATAL_ERROR "Unit tests failed.")
|
|
endif()
|