Merge pull request #1277 from ZyX-I/update-tests
Update code according to the changes in deps repository
This commit is contained in:
commit
8b17a19ebe
|
@ -19,6 +19,7 @@ if test -n "$USE_UCS2_PYTHON" ; then
|
|||
set +e
|
||||
mkvirtualenv -p "$PYTHON" cpython-ucs2-$UCS2_PYTHON_VARIANT
|
||||
set -e
|
||||
. tests/bot-ci/scripts/common/main.sh
|
||||
pip install .
|
||||
if test "$UCS2_PYTHON_VARIANT" = "2.6" ; then
|
||||
rm tests/bot-ci/deps/wheels/ucs2-CPython-${UCS2_PYTHON_VARIANT}*/pyuv*.whl
|
||||
|
@ -33,10 +34,10 @@ else
|
|||
rm tests/bot-ci/deps/wheels/$PYTHON_SUFFIX/pyuv*.whl
|
||||
fi
|
||||
pip install --no-deps tests/bot-ci/deps/wheels/$PYTHON_SUFFIX/*.whl
|
||||
if test "$PYTHON_IMPLEMENTATION" = "CPython" ; then
|
||||
archive="${PWD:-$(pwd)}/tests/bot-ci/deps/zpython/zsh-${PYTHON_VERSION}.tar.gz"
|
||||
sudo sh -c "cd /opt && tar xzf $archive"
|
||||
fi
|
||||
fi
|
||||
if test "$PYTHON_IMPLEMENTATION" = "CPython" ; then
|
||||
archive="${PWD:-$(pwd)}/tests/bot-ci/deps/zpython/zsh-${PYTHON_MM}${USE_UCS2_PYTHON:+-ucs2}.tar.gz"
|
||||
sudo sh -c "cd /opt && tar xzf $archive"
|
||||
fi
|
||||
|
||||
archive="${PWD:-$(pwd)}/tests/bot-ci/deps/fish/fish.tar.gz"
|
||||
|
|
|
@ -4,7 +4,8 @@ FAILED=0
|
|||
|
||||
if test -z "$VIM" ; then
|
||||
if test -n "$USE_UCS2_PYTHON" ; then
|
||||
NEW_VIM="$ROOT/tests/bot-ci/deps/vim/tip-$UCS2_PYTHON_VARIANT-double/vim"
|
||||
NEW_VIM="$ROOT/tests/bot-ci/deps/vim/tip-$UCS2_PYTHON_VARIANT-ucs2-double/vim"
|
||||
OLD_VIM="$ROOT/tests/bot-ci/deps/vim/v7-0-112-$UCS2_PYTHON_VARIANT-ucs2/vim"
|
||||
opt_dir="/opt/cpython-ucs2-$UCS2_PYTHON_VARIANT"
|
||||
main_path="$opt_dir/lib/python$UCS2_PYTHON_VARIANT"
|
||||
site_path="$main_path/site-packages"
|
||||
|
@ -16,8 +17,8 @@ if test -z "$VIM" ; then
|
|||
if test "$PYTHON_IMPLEMENTATION" != "CPython" ; then
|
||||
exit 0
|
||||
fi
|
||||
NEW_VIM="$ROOT/tests/bot-ci/deps/vim/tip-$PYTHON_VERSION/vim"
|
||||
OLD_VIM="$ROOT/tests/bot-ci/deps/vim/v7-0-112-$PYTHON_VERSION/vim"
|
||||
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 -e "$OLD_VIM" ; then
|
||||
VIMS="NEW_VIM OLD_VIM"
|
||||
else
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -6,7 +6,7 @@ FAILED=0
|
|||
export PATH="/opt/fish/bin:${PATH}"
|
||||
|
||||
if test "$PYTHON_IMPLEMENTATION" = "CPython" ; then
|
||||
export PATH="/opt/zsh-${PYTHON_VERSION}/bin:${PATH}"
|
||||
export PATH="/opt/zsh-${PYTHON_MM}${USE_UCS2_PYTHON:+-ucs2}/bin:${PATH}"
|
||||
fi
|
||||
|
||||
if test -n "$USE_UCS2_PYTHON" ; then
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
. tests/bot-ci/scripts/common/main.sh
|
||||
set +x
|
||||
|
||||
: ${POWERLINE_TMUX_EXE:=tmux}
|
||||
|
||||
FAILED=0
|
||||
|
||||
rm -rf tests/vterm
|
||||
|
@ -16,6 +14,8 @@ ln -s "$(which env)" tests/vterm/path
|
|||
ln -s "$PWD/scripts/powerline-render" tests/vterm/path
|
||||
ln -s "$PWD/scripts/powerline-config" tests/vterm/path
|
||||
|
||||
cp -r tests/terminfo tests/vterm
|
||||
|
||||
FAIL_SUMMARY=""
|
||||
|
||||
test_tmux() {
|
||||
|
@ -26,11 +26,12 @@ test_tmux() {
|
|||
if ! which "${POWERLINE_TMUX_EXE}" ; then
|
||||
return 0
|
||||
fi
|
||||
ln -s "$(which "${POWERLINE_TMUX_EXE}")" tests/vterm/path
|
||||
if ! "${PYTHON}" tests/test_in_vterm/test_tmux.py; then
|
||||
ln -sf "$(which "${POWERLINE_TMUX_EXE}")" tests/vterm/path
|
||||
f=tests/test_in_vterm/test_tmux.py
|
||||
if ! "${PYTHON}" $f ; then
|
||||
echo "Failed vterm test $f"
|
||||
FAILED=1
|
||||
FAIL_SUMMARY="$FAIL_SUMMARY${NL}F $f"
|
||||
FAIL_SUMMARY="$FAIL_SUMMARY${NL}F $POWERLINE_TMUX_EXE $f"
|
||||
for file in tests/vterm/*.log ; do
|
||||
if ! test -e "$file" ; then
|
||||
break
|
||||
|
@ -43,7 +44,16 @@ test_tmux() {
|
|||
fi
|
||||
}
|
||||
|
||||
test_tmux || true
|
||||
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"
|
||||
if test_tmux ; then
|
||||
rm -f tests/vterm/*.log
|
||||
fi
|
||||
done
|
||||
else
|
||||
test_tmux || true
|
||||
fi
|
||||
|
||||
if test $FAILED -eq 0 ; then
|
||||
echo "$FAIL_SUMMARY"
|
||||
|
|
|
@ -59,7 +59,35 @@ def main():
|
|||
],
|
||||
cwd=VTERM_TEST_DIR,
|
||||
env={
|
||||
'TERM': 'vt100',
|
||||
# Reasoning:
|
||||
# 1. vt* TERMs (used to be vt100 here) make tmux-1.9 use
|
||||
# different and identical colors for inactive windows. This
|
||||
# is not like tmux-1.6: foreground color is different from
|
||||
# separator color and equal to (0, 102, 153) for some reason
|
||||
# (separator has correct color). tmux-1.8 is fine, so are
|
||||
# older versions (though tmux-1.6 and tmux-1.7 do not have
|
||||
# highlighting for previously active window) and my system
|
||||
# tmux-1.9a.
|
||||
# 2. screen, xterm and some other non-256color terminals both
|
||||
# have the same issue and make libvterm emit complains like
|
||||
# `Unhandled CSI SGR 3231`.
|
||||
# 3. screen-256color, xterm-256color and other -256color
|
||||
# terminals make libvterm emit complains about unhandled
|
||||
# escapes to stderr.
|
||||
# 4. `st-256color` does not have any of the above problems, but
|
||||
# it may be not present on the target system because it is
|
||||
# installed with x11-terms/st and not with sys-libs/ncurses.
|
||||
#
|
||||
# For the given reasons decision was made: to fix tmux-1.9 tests
|
||||
# and not make libvterm emit any data to stderr st-256color
|
||||
# $TERM should be used, up until libvterm has its own terminfo
|
||||
# database entry (if it ever will). To make sure that relevant
|
||||
# terminfo entry is present on the target system it should be
|
||||
# distributed with powerline test package. To make distribution
|
||||
# not require modifying anything outside of powerline test
|
||||
# directory TERMINFO variable is set.
|
||||
'TERMINFO': os.path.join(VTERM_TEST_DIR, 'terminfo'),
|
||||
'TERM': 'st-256color',
|
||||
'PATH': vterm_path,
|
||||
'SHELL': os.path.join(''),
|
||||
'POWERLINE_CONFIG_PATHS': os.path.abspath('powerline/config_files'),
|
||||
|
@ -170,6 +198,7 @@ def main():
|
|||
finally:
|
||||
check_call([tmux_exe, '-S', socket_path, 'kill-server'], env={
|
||||
'PATH': vterm_path,
|
||||
'LD_LIBRARY_PATH': os.environ.get('LD_LIBRARY_PATH', ''),
|
||||
})
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue