mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00

The 'lupa' python package provides a simple way to seamless integrate lua and python code. This commit replaces vroom by a python script that exposes the 'neovim' package to a lua state, and invokes busted to run functional tests. This is a temporary solution that will enable writing functional tests using lua/bused while a lua client library is not available. The reason for dropping vroom is flexibility: Lua/busted has a nice DSL-style syntax while also providing the customization power of a full programming language. Another reason is to use a single framework for unit/functional tests. Two other changes were performed in this commit: - Instead of "gcc-unittest/gcc-ia32", the travis builds for gcc are now identified by "gcc/gcc-32". They will run unit/functional tests for both 64 and 32 bits. - Old integration tests(in src/nvim/testdir) are now ran by the 'oldtest' target
24 lines
686 B
CMake
24 lines
686 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()
|
|
|
|
if(TEST_TYPE STREQUAL "functional")
|
|
execute_process(
|
|
COMMAND python ${BUSTED_PRG} ${BUSTED_REAL_PRG} -v -o
|
|
${BUSTED_OUTPUT_TYPE} --lpath=${BUILD_DIR}/?.lua ${TEST_DIR}/legacy
|
|
WORKING_DIRECTORY ${WORKING_DIR}
|
|
RESULT_VARIABLE res)
|
|
else()
|
|
execute_process(
|
|
COMMAND ${BUSTED_PRG} -v -o ${BUSTED_OUTPUT_TYPE}
|
|
--lpath=${BUILD_DIR}/?.lua ${TEST_DIR}/unit
|
|
WORKING_DIRECTORY ${WORKING_DIR}
|
|
RESULT_VARIABLE res)
|
|
endif()
|
|
|
|
if(NOT res EQUAL 0)
|
|
message(FATAL_ERROR "Unit tests failed.")
|
|
endif()
|