Improve the output of the tests, and fix the style issue again.

This commit is contained in:
w0rp 2016-10-12 23:55:09 +01:00
parent afec4df13f
commit 217bb5cb40
3 changed files with 20 additions and 6 deletions

View File

@ -1,17 +1,31 @@
IMAGE ?= w0rp/ale IMAGE ?= w0rp/ale
DOCKER = docker run -a stderr --rm -v $(PWD):/testplugin -v $(PWD)/test:/home -v ${PWD}:/home/ale "$(IMAGE)" DOCKER_FLAGS = --rm -v $(PWD):/testplugin -v $(PWD)/test:/home "$(IMAGE)"
test-setup: test-setup:
docker images -q $(IMAGE) || docker pull $(IMAGE) docker images -q $(IMAGE) || docker pull $(IMAGE)
test: test-setup test: test-setup
@:; \
vims=$$(docker run --rm $(IMAGE) ls /vim-build/bin | grep -E '^n?vim'); \ vims=$$(docker run --rm $(IMAGE) ls /vim-build/bin | grep -E '^n?vim'); \
if [ -z "$$vims" ]; then echo "No Vims found!"; exit 1; fi; \ if [ -z "$$vims" ]; then echo "No Vims found!"; exit 1; fi; \
EXIT=0; \ EXIT=0; \
for vim in $$vims; do \ for vim in $$vims; do \
$(DOCKER) $$vim '+Vader! test/*' || EXIT=$$?; \ echo; \
echo '========================================'; \
echo "Running tests for $$vim"; \
echo '========================================'; \
echo; \
docker run -a stderr $(DOCKER_FLAGS) $$vim '+Vader! test/*' || EXIT=$$?; \
done; \ done; \
$(DOCKER) vint -s /testplugin || EXIT=$$?; \ echo; \
echo '========================================'; \
echo 'Running Vint to lint our code'; \
echo '========================================'; \
echo 'Vint warnings/errors follow:'; \
echo; \
docker run -a stdout $(DOCKER_FLAGS) vint -s /testplugin | sed s:^/testplugin/:: || EXIT=$$?; \
echo; \
echo; \
exit $$EXIT; exit $$EXIT;
.PHONY: test-setup test .DEFAULT_GOAL := test

View File

@ -26,7 +26,7 @@ endif
let g:ale_buffer_loclist_map = {} let g:ale_buffer_loclist_map = {}
let g:ale_buffer_should_reset_map = {} let g:ale_buffer_should_reset_map = {}
let ale_buffer_sign_dummy_map = {} let g:ale_buffer_sign_dummy_map = {}
" User Configuration " User Configuration

View File

@ -2,7 +2,7 @@
" Load builtin plugins " Load builtin plugins
" We need this because run_vim.sh sets -i NONE " We need this because run_vim.sh sets -i NONE
set runtimepath=/home/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,/home/vim/after set runtimepath=/home/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,/testplugin
set runtimepath+=/home/ale set runtimepath+=/home/ale
set runtimepath+=/vader set runtimepath+=/vader