mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
5e5525a78b
This is required for testing scripts under the 'runtime' directory
25 lines
582 B
CMake
25 lines
582 B
CMake
get_filename_component(BUSTED_DIR ${BUSTED_PRG} PATH)
|
|
set(ENV{PATH} "${BUSTED_DIR}:$ENV{PATH}")
|
|
|
|
set(ENV{VIMRUNTIME} ${WORKING_DIR}/runtime)
|
|
|
|
if(NVIM_PRG)
|
|
set(ENV{NVIM_PROG} "${NVIM_PRG}")
|
|
endif()
|
|
|
|
if(DEFINED ENV{TEST_FILE})
|
|
set(TEST_PATH "$ENV{TEST_FILE}")
|
|
else()
|
|
set(TEST_PATH "${TEST_DIR}/${TEST_TYPE}")
|
|
endif()
|
|
|
|
execute_process(
|
|
COMMAND ${BUSTED_PRG} -v -o ${BUSTED_OUTPUT_TYPE}
|
|
--lpath=${BUILD_DIR}/?.lua ${TEST_PATH}
|
|
WORKING_DIRECTORY ${WORKING_DIR}
|
|
RESULT_VARIABLE res)
|
|
|
|
if(NOT res EQUAL 0)
|
|
message(FATAL_ERROR "Running ${TEST_TYPE} tests failed.")
|
|
endif()
|