mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
Merge pull request #16707 from jamessan/filter-out-tests
test: allow excluding functional/unti tests using TEST_FILTER_OUT
This commit is contained in:
commit
2202400f15
@ -46,6 +46,10 @@ if(DEFINED ENV{TEST_FILTER} AND NOT "$ENV{TEST_FILTER}" STREQUAL "")
|
||||
list(APPEND BUSTED_ARGS --filter $ENV{TEST_FILTER})
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{TEST_FILTER_OUT} AND NOT "$ENV{TEST_FILTER_OUT}" STREQUAL "")
|
||||
list(APPEND BUSTED_ARGS --filter-out $ENV{TEST_FILTER_OUT})
|
||||
endif()
|
||||
|
||||
# TMPDIR: use relative test path (for parallel test runs / isolation).
|
||||
set(ENV{TMPDIR} "${BUILD_DIR}/Xtest_tmpdir/${TEST_PATH}")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory $ENV{TMPDIR})
|
||||
|
@ -116,7 +116,7 @@ Filtering Tests
|
||||
|
||||
### Filter by name
|
||||
|
||||
Another filter method is by setting a pattern of test name to `TEST_FILTER`.
|
||||
Another filter method is by setting a pattern of test name to `TEST_FILTER` or `TEST_FILTER_OUT`.
|
||||
|
||||
``` lua
|
||||
it('foo api',function()
|
||||
@ -131,6 +131,10 @@ To run only test with filter name:
|
||||
|
||||
TEST_FILTER='foo.*api' make functionaltest
|
||||
|
||||
To run all tests except ones matching a filter:
|
||||
|
||||
TEST_FILTER_OUT='foo.*api' make functionaltest
|
||||
|
||||
### Filter by file
|
||||
|
||||
To run a *specific* unit test:
|
||||
|
Loading…
Reference in New Issue
Block a user