File tree Expand file tree Collapse file tree 6 files changed +22
-17
lines changed Expand file tree Collapse file tree 6 files changed +22
-17
lines changed Original file line number Diff line number Diff line change 11FROM alpine:3.5
22
3- RUN adduser -h /home -s /bin/sh -D -u 8465 vimtest
3+ RUN adduser -h /home/testbed -s /bin/sh -D -u 8465 vimtest
44
5- RUN mkdir -p /vim /vim-build/bin /plugins
6- RUN chown vimtest:vimtest /home /plugins
5+ RUN mkdir -p /vim /vim-build/bin
76
87# Useful during tests to have these packages in a deeper layer cached already.
98# RUN apk --no-cache add --virtual vim-build build-base
@@ -12,14 +11,17 @@ ADD scripts/argecho.sh /vim-build/bin/argecho
1211ADD scripts/install_vim.sh /sbin/install_vim
1312ADD scripts/run_vim.sh /sbin/run_vim
1413
15- RUN chmod +x /vim-build/bin/argecho /sbin/install_vim /sbin/run_vim
14+ RUN mkdir /home/testbed/.vim /home/testbed/.config
15+ ADD scripts/init.vim /home/testbed/.vim/
16+ RUN ln -s ../.vim /home/testbed/.config/nvim
17+ RUN ln -s .vim/init.vim /home/testbed/.vimrc
1618
17- ADD scripts/rtp. vim /rtp.vim
19+ RUN chmod +x / vim-build/bin/argecho /sbin/install_vim /sbin/run_vim
1820
1921# The user directory for setup
20- VOLUME /home
22+ VOLUME /home/testbed
2123
2224# Your plugin
23- VOLUME /testplugin
25+ VOLUME /testbed
2426
2527ENTRYPOINT ["/sbin/run_vim" ]
Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ WRITABLE_HOME:=$(shell tmpdir=$$(mktemp -d --dry-run); \
77 cd $(CURDIR ) /test; \
88 cp -a vimrc * .vader $${tmpdir}/; \
99 echo $${tmpdir})
10- DOCKER = docker run -a stderr --rm \
11- -v $(CURDIR ) :/testplugin \
12- -v $(WRITABLE_HOME ) :/home \
13- -v $(CURDIR ) /$(PLUGINS ) :/home/plugins "$(IMAGE ) "
10+ TODO : remove/unneeded by now?!
11+ # -v $(WRITABLE_HOME):/home/testbed \
12+
13+ DOCKER = docker run -ti --rm \
14+ -v $(CURDIR ) :/testbed \
15+ -v $(CURDIR ) /$(PLUGINS ) :/home/testbed/.vim/plugins "$(IMAGE ) "
1416
1517test : test-setup
1618 docker build -f Dockerfile.tests -t " $( IMAGE) " .
Original file line number Diff line number Diff line change 11" vint: -ProhibitSetNoCompatible
2- source /rtp .vim
2+
3+ let s: this_dir = expand (' <sfile>:h' )
4+ exe ' set runtimepath+=' .s: this_dir .' /test/plugins/vader.vim'
35
46filetype plugin indent on
57syntax on
Original file line number Diff line number Diff line change 1+ set runtimepath += /testbed
2+ source /testbed/ testbed.vim
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ if ! [ -x "/vim-build/bin/$BIN" ]; then
1111fi
1212
1313# Set default vimrc to a visible file
14- ARGS=" -u /home/vimrc - i NONE"
14+ ARGS=" -i NONE"
1515
1616# So we can pass the arguments to Vim as it was passed to this script
1717while [ $# -gt 0 ]; do
2121
2222# Run as the vimtest user. This is not really for security. It is for running
2323# Vim as a user that's unable to write to your volume.
24- exec su -l vimtest -c " cd /testplugin && /vim-build/bin/$BIN $ARGS "
24+ exec su -l vimtest -c " cd /testbed && env VIM_TESTBED=1 /vim-build/bin/$BIN $ARGS "
You can’t perform that action at this time.
0 commit comments