mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
build: fix running of functional tests directly with CMake
If you aren't just building everything into build/, then the functional tests fail because they can't find the nvim executable. Let's pass in the location of the nvim executable, and set NVIM_PRG environment variable accordingly.
This commit is contained in:
parent
d1675de0a9
commit
5ba1d980fb
@ -252,6 +252,7 @@ if(BUSTED_PRG)
|
||||
add_custom_target(functionaltest
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DBUSTED_PRG=${BUSTED_PRG}
|
||||
-DNVIM_PRG=$<TARGET_FILE:nvim>
|
||||
-DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE}
|
||||
-DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test
|
||||
|
@ -1,5 +1,9 @@
|
||||
get_filename_component(BUSTED_DIR ${BUSTED_PRG} PATH)
|
||||
set(ENV{PATH} "${BUSTED_DIR}:$ENV{PATH}")
|
||||
if(NVIM_PRG)
|
||||
set(ENV{NVIM_PROG} "${NVIM_PRG}")
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{TEST_FILE})
|
||||
set(TEST_DIR $ENV{TEST_FILE})
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user