summaryrefslogtreecommitdiff
path: root/Makefile
blob: b0bbf3ee4b89ce3f198cd5aff934401a4ed99569 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
IMAGE ?= w0rp/ale
DOCKER = docker run -a stderr --rm -v $(PWD):/testplugin -v $(PWD)/test:/home "$(IMAGE)"

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; \
	EXIT=0; \
	for vim in $$vims; do \
	  $(DOCKER) $$vim '+Vader! test/*' || EXIT=$$?; \
	done; \
	$(DOCKER) vint -s /testplugin || EXIT=$$?; \
	exit $$EXIT;

.PHONY: test-setup test