Pass busted the path to the detected Lua interpreter

Otherwise, busted may run a different interpreter than the one we
detected, without the capabilities we expect.  (For instance, we might
have detected the luajit interpreter, but busted might run the lua
interpreter, without the ffi module.)
This commit is contained in:
Josh Triplett 2016-07-13 00:37:50 -07:00
parent dcbd1c7b13
commit fc98d2d96d
2 changed files with 4 additions and 1 deletions

View File

@ -501,6 +501,7 @@ if(BUSTED_PRG)
add_custom_target(functionaltest
COMMAND ${CMAKE_COMMAND}
-DBUSTED_PRG=${BUSTED_PRG}
-DLUA_PRG=${LUA_PRG}
-DNVIM_PRG=$<TARGET_FILE:nvim>
-DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE}
@ -514,6 +515,7 @@ if(BUSTED_PRG)
add_custom_target(benchmark
COMMAND ${CMAKE_COMMAND}
-DBUSTED_PRG=${BUSTED_PRG}
-DLUA_PRG=${LUA_PRG}
-DNVIM_PRG=$<TARGET_FILE:nvim>
-DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE}
@ -529,6 +531,7 @@ if(BUSTED_LUA_PRG)
add_custom_target(functionaltest-lua
COMMAND ${CMAKE_COMMAND}
-DBUSTED_PRG=${BUSTED_LUA_PRG}
-DLUA_PRG=${LUA_PRG}
-DNVIM_PRG=$<TARGET_FILE:nvim>
-DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE}

View File

@ -27,7 +27,7 @@ endif()
execute_process(
COMMAND ${BUSTED_PRG} ${TEST_TAG} ${TEST_FILTER} -v -o ${BUSTED_OUTPUT_TYPE}
--lazy --helper=${TEST_DIR}/${TEST_TYPE}/preload.lua
--lua=${LUA_PRG} --lazy --helper=${TEST_DIR}/${TEST_TYPE}/preload.lua
--lpath=${BUILD_DIR}/?.lua ${TEST_PATH}
WORKING_DIRECTORY ${WORKING_DIR}
ERROR_VARIABLE err