diff --git a/cmake/RunTests.cmake b/cmake/RunTests.cmake index 9630389ce0..e2096dc06c 100644 --- a/cmake/RunTests.cmake +++ b/cmake/RunTests.cmake @@ -49,6 +49,10 @@ endif() set(ENV{TMPDIR} "${BUILD_DIR}/Xtest_tmpdir/${TEST_PATH}") execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory $ENV{TMPDIR}) +if(NOT DEFINED ENV{TEST_TIMEOUT} OR "$ENV{TEST_TIMEOUT}" STREQUAL "") + set(ENV{TEST_TIMEOUT} 1200) +endif() + set(ENV{SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_NAME}) # used by test/helpers.lua. execute_process( COMMAND ${BUSTED_PRG} -v -o test.busted.outputHandlers.${BUSTED_OUTPUT_TYPE} @@ -58,7 +62,7 @@ execute_process( --lpath=?.lua ${BUSTED_ARGS} ${TEST_PATH} - TIMEOUT 1200 + TIMEOUT $ENV{TEST_TIMEOUT} WORKING_DIRECTORY ${WORKING_DIR} ERROR_VARIABLE err RESULT_VARIABLE res diff --git a/test/README.md b/test/README.md index a6e9080a40..8669ab6f3e 100644 --- a/test/README.md +++ b/test/README.md @@ -258,6 +258,9 @@ Number; !must be defined to function properly): - `TEST_SKIP_FRAGILE` (F) (D): makes test suite skip some fragile tests. +- `TEST_TIMEOUT` (FU) (I): specifies maximum time, in seconds, before the test + suite run is killed + - `NVIM_PROG`, `NVIM_PRG` (F) (S): override path to Neovim executable (default to `build/bin/nvim`).