Modify how tests are run to improve overall speed.

A Vader issue causes problems with the test results when using the
location list. Because of this the tests were modified to run 1 test
file per vim instance instead of running all tests in a single vim
instance. This resulted in signficant slow down in test execution time.
To speed up execution time only specific tests are run individually now.
This commit is contained in:
Rane Brown 2019-12-13 19:58:08 -07:00
parent eb26a66be5
commit 4f648b6567
5 changed files with 17 additions and 3 deletions

View File

@ -50,3 +50,6 @@ plugin source files. For more information run `./run_tests.sh -h`.
`Vim: Error reading input, exiting...`
- Probably need to look into this more and determine if the issue is Vader,
Neovim, or Docker.
2. Vader does not play nice with the location list. Tests that use the location
list should be placed in `independent_runs/`.
- [Vader Issue #199](https://github.com/junegunn/vader.vim/issues/199)

View File

@ -1,4 +1,4 @@
Include: vader_includes/vader_setup.vader
Include: vader_setup
Execute (Setup search testing wrapper):
function! TestSearch(search_command, test_name)
@ -63,4 +63,4 @@ Execute (Search failure message):
redir END
Assert match(output, 'VimwikiSearch: No match found.') > -1, "expected custom error"
Include: vader_includes/vader_teardown.vader
Include: vader_teardown

View File

@ -0,0 +1 @@
../vader_includes/vader_setup.vader

View File

@ -0,0 +1 @@
../vader_includes/vader_teardown.vader

View File

@ -36,11 +36,20 @@ runVader() {
echo ""
echo "Running version: $v"
vim="/vim-build/bin/$v -u test/vimrc -i NONE"
test_cmd="for VF in test/*.vader; do $vim \"+Vader! \$VF\"; done"
test_cmd="for VF in test/independent_runs/*.vader; do $vim \"+Vader! \$VF\"; done"
set -o pipefail
# tests that must be run in individual vim instances
# see README.md for more information
docker run -a stderr -e VADER_OUTPUT_FILE=/dev/stderr "${flags[@]}" \
/bin/bash -c "$test_cmd" 2>&1 | vader_filter | vader_color
# remaining tests
docker run -a stderr -e VADER_OUTPUT_FILE=/dev/stderr "${flags[@]}" \
"$v" -u test/vimrc -i NONE "+Vader! test/*" 2>&1 | vader_filter | vader_color
set +o pipefail
done
}