Merge pull request #1316 from ZyX-I/full-non-travis-tests

Make it possible to run the whole test suite outside of travis
This commit is contained in:
Nikolai Aleksandrovich Pavlov 2015-02-21 00:59:25 +03:00
commit 6343ff0d8f
4 changed files with 45 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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