diff options
author | w0rp <devw0rp@gmail.com> | 2017-02-15 20:40:50 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-02-15 20:40:50 +0000 |
commit | 2e7050dbe2cdce030ed2f4189b9a904e67b352af (patch) | |
tree | 946e258529d1e0359a263bcdb59cba9a8385e77e /Makefile | |
parent | 721a850e21e31b4abfebff00d4bb43bfefcdabe4 (diff) | |
download | ale-2e7050dbe2cdce030ed2f4189b9a904e67b352af.zip |
Create a make target and variable for running specific tests
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -2,11 +2,20 @@ SHELL := /usr/bin/env bash IMAGE ?= w0rp/ale CURRENT_IMAGE_ID = 107e4efc4267 DOCKER_FLAGS = --rm -v $(PWD):/testplugin -v $(PWD)/test:/home "$(IMAGE)" +tests = test/* test-setup: docker images -q w0rp/ale | grep ^$(CURRENT_IMAGE_ID) > /dev/null || \ docker pull $(IMAGE) +vader: 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; \ + for vim in $$vims; do \ + docker run -a stderr $(DOCKER_FLAGS) $$vim '+Vader! $(tests)'; \ + done + test: test-setup @:; \ vims=$$(docker run --rm $(IMAGE) ls /vim-build/bin | grep -E '^n?vim'); \ @@ -18,7 +27,7 @@ test: test-setup echo "Running tests for $$vim"; \ echo '========================================'; \ echo; \ - docker run -a stderr $(DOCKER_FLAGS) $$vim '+Vader! test/*' || EXIT=$$?; \ + docker run -a stderr $(DOCKER_FLAGS) $$vim '+Vader! $(tests)' || EXIT=$$?; \ done; \ echo; \ echo '========================================'; \ |