Run the upate in CI too

This commit is contained in:
Ben Jackson 2020-07-22 15:04:48 +01:00
commit 8a6d56d3e1
2 changed files with 19 additions and 2 deletions

View file

@ -55,7 +55,7 @@ stages:
- bash: |
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
export GOPATH=$HOME/go
./run_tests --install --report messages --quiet
./run_tests --install --update --report messages --quiet
displayName: 'Run the tests'
env:
VIMSPECTOR_MIMODE: gdb
@ -96,7 +96,7 @@ stages:
- bash: vim --version
displayName: 'Print vim version information'
- bash: ./run_tests --install --report messages --quiet
- bash: ./run_tests --install --update --report messages --quiet
displayName: 'Run the tests'
env:
VIMSPECTOR_MIMODE: lldb

View file

@ -2,6 +2,7 @@
BASEDIR=$(dirname $0)
INSTALL=0
UPDATE=0
RUN_VIM="vim -N --clean --not-a-term"
RUN_TEST="${RUN_VIM} -S lib/run_test.vim"
BASEDIR_CMD='py3 pass'
@ -30,6 +31,10 @@ while [ -n "$1" ]; do
INSTALL=$1
shift
;;
"--update")
UPDATE=1
shift
;;
"--report")
shift
VIMSPECTOR_TEST_STDOUT=$1
@ -94,6 +99,18 @@ if [ "$INSTALL" = "1" ] || [ "$INSTALL" = "vim" ]; then
fi
fi
if [ "$UPDATE" = "1" ]; then
if ! $RUN_VIM -u $(dirname $0)/tests/vimrc \
--cmd "${BASEDIR_CMD}" \
-c 'autocmd User VimspectorInstallSuccess qa!' \
-c 'autocmd User VimspectorInstallFailed cquit!' \
-c "VimspectorUpdate"; then
echo "Vim update reported errors" >&2
exit 1
fi
fi
if [ -z "$VIMSPECTOR_MIMODE" ]; then
if which lldb >/dev/null 2>&1; then
export VIMSPECTOR_MIMODE=lldb