2016-10-10 22:28:25 -04:00
|
|
|
IMAGE ?= w0rp/ale
|
2016-10-12 18:17:09 -04:00
|
|
|
DOCKER = docker run -a stderr --rm -v $(PWD):/testplugin -v $(PWD)/test:/home -v ${PWD}:/home/ale "$(IMAGE)"
|
2016-10-10 22:28:25 -04:00
|
|
|
|
|
|
|
test-setup:
|
|
|
|
docker images -q $(IMAGE) || docker pull $(IMAGE)
|
|
|
|
|
|
|
|
test: test-setup
|
|
|
|
vims=$$(docker run --rm $(IMAGE) ls /vim-build/bin | grep -E '^n?vim'); \
|
|
|
|
if [ -z "$$vims" ]; then echo "No Vims found!"; exit 1; fi; \
|
2016-10-12 07:25:53 -04:00
|
|
|
EXIT=0; \
|
2016-10-10 22:28:25 -04:00
|
|
|
for vim in $$vims; do \
|
2016-10-12 07:25:53 -04:00
|
|
|
$(DOCKER) $$vim '+Vader! test/*' || EXIT=$$?; \
|
|
|
|
done; \
|
|
|
|
$(DOCKER) vint -s /testplugin || EXIT=$$?; \
|
|
|
|
exit $$EXIT;
|
2016-10-10 22:28:25 -04:00
|
|
|
|
|
|
|
.PHONY: test-setup test
|