Skip to content

Commit 124a946

Browse files
committed
Add test_quick make target
1 parent e3679d8 commit 124a946

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ update_latest:
1414

1515
# test: build the base image and example image on top, running tests therein.
1616
DOCKER_BASE_IMAGE:=vim-testbed-base
17-
test:
17+
18+
test test_quick:
1819
docker build -t "$(DOCKER_BASE_IMAGE)" .
19-
make -C example test
20+
make -C example $<
21+
22+
.PHONY: build push test test_quick

example/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
FROM testbed/vim
22

3-
RUN install_vim -tag v7.1 -name vim71 -prebuild_script 'echo "#define FEAT_PROFILE" >> src/feature.h' -build \
4-
-tag v7.3.429 -name vim73 -py -build \
3+
RUN install_vim -tag v7.3.429 -name vim73 -py -build \
54
-tag v7.4.052 -name vim74-trusty -build \
65
-tag master -py2 -py3 -ruby -lua -build \
76
-tag neovim:v0.2.0 -py2 -py3 -ruby -build \

example/Dockerfile.quicktests

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Dockerfile for quick tests.
2+
FROM vim-testbed-base
3+
4+
RUN install_vim -tag v7.1 -name vim71 \
5+
-prebuild_script 'echo "#define FEAT_PROFILE" >> src/feature.h' -build

example/Makefile

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,17 @@ DOCKER = docker run -a stderr --rm \
1212
-v $(WRITABLE_HOME):/home/vimtest \
1313
-v $(CURDIR)/$(PLUGINS):/home/vimtest/plugins "$(IMAGE)"
1414

15-
test: build $(PLUGINS)/vader.vim
16-
test: test_vim71_with_profiling_enabled
15+
test_quick: $(PLUGINS)/vader.vim
16+
test_quick:
17+
docker build -f Dockerfile.quicktests -t "$(IMAGE)" .
18+
docker run --rm "$(IMAGE)" vim71 -es -u NORC -c "exe has('profile') ? 'q' : 'cq'" || { \
19+
echo "vim71 should have FEAT_PROFILE enabled."; \
20+
docker run --rm "$(IMAGE)" vim71 --version; \
21+
exit 1; }
22+
$(DOCKER) vim71 '+Vader! test/*'
23+
24+
test: test_quick
25+
test: Dockerfile.tests $(PLUGINS)/vader.vim
1726
test:
1827
set -ex; \
1928
vims="$$(docker run --rm $(IMAGE) ls /vim-build/bin | grep vim)"; \
@@ -69,12 +78,6 @@ test:
6978
exit 1; \
7079
fi
7180

72-
test_vim71_with_profiling_enabled:
73-
docker run --rm "$(IMAGE)" vim71 -es -u NORC -c "exe has('profile') ? 'q' : 'cq'" || { \
74-
echo "vim71 should have FEAT_PROFILE enabled."; \
75-
docker run --rm "$(IMAGE)" vim71 --version; \
76-
exit 1; }
77-
7881
build: Dockerfile.tests
7982
docker build -f Dockerfile.tests -t "$(IMAGE)" .
8083

@@ -87,4 +90,4 @@ $(PLUGINS)/vader.vim:
8790
mkdir -p $(PLUGINS)
8891
cd $(PLUGINS) && git clone https://github.com/junegunn/vader.vim.git
8992

90-
.PHONY: test-setup test
93+
.PHONY: test

0 commit comments

Comments
 (0)