diff --git a/tests/run_vim_tests.sh b/tests/run_vim_tests.sh index 5fdc3975..b5bf8723 100755 --- a/tests/run_vim_tests.sh +++ b/tests/run_vim_tests.sh @@ -17,8 +17,12 @@ if test -z "$VIM" ; then if test "$PYTHON_IMPLEMENTATION" != "CPython" ; then exit 0 fi - NEW_VIM="$ROOT/tests/bot-ci/deps/vim/tip-$PYTHON_MM/vim" - OLD_VIM="$ROOT/tests/bot-ci/deps/vim/v7-0-112-$PYTHON_MM/vim" + if test -d "$ROOT/tests/bot-ci/deps" ; then + NEW_VIM="$ROOT/tests/bot-ci/deps/vim/tip-$PYTHON_MM/vim" + OLD_VIM="$ROOT/tests/bot-ci/deps/vim/v7-0-112-$PYTHON_MM/vim" + else + NEW_VIM="vim" + fi if test -e "$OLD_VIM" ; then VIMS="NEW_VIM OLD_VIM" else @@ -39,6 +43,9 @@ test_script() { local vim="$1" local script="$2" echo "Running script $script with $vim" + if ! test -e "$vim" ; then + return 0 + fi if ! "$vim" -u NONE -S $script || test -f message.fail ; then echo "Failed script $script run with $VIM" >&2 cat message.fail >&2 diff --git a/tests/test_in_vterm/test.sh b/tests/test_in_vterm/test.sh index 930aab75..e042aac1 100755 --- a/tests/test_in_vterm/test.sh +++ b/tests/test_in_vterm/test.sh @@ -38,8 +38,10 @@ test_tmux() { if test -z "$POWERLINE_TMUX_EXE" && test -d tests/bot-ci/deps/tmux ; then for tmux in tests/bot-ci/deps/tmux/tmux-*/tmux ; do export POWERLINE_TMUX_EXE="$PWD/$tmux" + test_tmux || true done else + export POWERLINE_TMUX_EXE="${POWERLINE_TMUX_EXE:-tmux}" test_tmux || true fi diff --git a/tests/test_in_vterm/test_tmux.py b/tests/test_in_vterm/test_tmux.py index 744804c9..3cd137e2 100755 --- a/tests/test_in_vterm/test_tmux.py +++ b/tests/test_in_vterm/test_tmux.py @@ -103,9 +103,14 @@ def main(attempts=3): tmux_exe = os.path.join(vterm_path, 'tmux') + if os.path.exists('tests/bot-ci/deps/libvterm/libvterm.so'): + lib = 'tests/bot-ci/deps/libvterm/libvterm.so' + else: + lib = os.environ.get('POWERLINE_LIBVTERM', 'libvterm.so') + try: p = ExpectProcess( - lib='tests/bot-ci/deps/libvterm/libvterm.so', + lib=lib, rows=rows, cols=cols, cmd=tmux_exe, diff --git a/tests/test_shells/test.sh b/tests/test_shells/test.sh index 14430361..e88d2e9a 100755 --- a/tests/test_shells/test.sh +++ b/tests/test_shells/test.sh @@ -311,6 +311,33 @@ fi for exe in bash zsh busybox fish tcsh mksh dash ipython ; do if which $exe >/dev/null ; then + if test "$exe" = "fish" ; then + fish_version="$(fish --version 2>&1)" + fish_version="${fish_version##* }" + fish_version_major="${fish_version%%.*}" + if test "$fish_version_major" != "$fish_version" ; then + # No dot is in development version compiled by bot-ci + fish_version_minor="${fish_version#*.}" + fish_version_patch="${fish_version_minor#*.}" + fish_version_dev="${fish_version_patch#*-}" + if test "$fish_version_dev" = "$fish_version_patch" ; then + fish_version_dev="" + fi + fish_version_minor="${fish_version_minor%%.*}" + fish_version_patch="${fish_version_patch%%-*}" + if test $fish_version_major -lt 2 || ( \ + test $fish_version_major -eq 2 && (\ + test $fish_version_minor -lt 1 || (\ + test $fish_version_minor -eq 1 && + test $fish_version_patch -lt 2 && \ + test -z "$fish_version_dev" + ) \ + ) \ + ) ; then + continue + fi + fi + fi ln -s "$(which $exe)" tests/shell/path fi done @@ -389,7 +416,7 @@ if test -z "${ONLY_SHELL}" || test "x${ONLY_SHELL%sh}" != "x${ONLY_SHELL}" || te continue fi fi - if test "$TEST_CLIENT" = "shell" && ! which socat >/dev/null ; then + if test "$TEST_CLIENT" = "shell" && ! test -x tests/shell/path/socat ; then continue fi if test "x$ONLY_TEST_CLIENT" != "x" && test "x$TEST_CLIENT" != "x$ONLY_TEST_CLIENT" ; then