diff options
author | James McCoy <jamessan@jamessan.com> | 2021-09-10 06:27:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-10 06:27:20 -0400 |
commit | 185ed18e6cc9113ef257e5491ada657a769a9d04 (patch) | |
tree | 6ee8bfe5385ab6907ba95834d108a7fcaac93ab7 | |
parent | 8f0c843c130a2117610e7892a8c1ca0887a54a6f (diff) | |
parent | 8d93223f83dcbe485f26b1508769b428250e682e (diff) | |
download | rneovim-185ed18e6cc9113ef257e5491ada657a769a9d04.tar.gz rneovim-185ed18e6cc9113ef257e5491ada657a769a9d04.tar.bz2 rneovim-185ed18e6cc9113ef257e5491ada657a769a9d04.zip |
Merge pull request #15618 from jamessan/test-timeout-config
test: use $TEST_TIMEOUT to specify timeout
-rw-r--r-- | cmake/RunTests.cmake | 6 | ||||
-rw-r--r-- | test/README.md | 3 |
2 files changed, 8 insertions, 1 deletions
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`). |