Use UCS2 Python versions for running tests
This commit is contained in:
parent
ef3acefdd1
commit
9ae76a9971
|
@ -10,5 +10,11 @@ matrix:
|
|||
- python: "3.4"
|
||||
- python: "pypy"
|
||||
- python: "pypy3"
|
||||
- env: >-
|
||||
USE_UCS2_PYTHON=1
|
||||
UCS2_PYTHON_VARIANT="2.6"
|
||||
- env: >-
|
||||
USE_UCS2_PYTHON=1
|
||||
UCS2_PYTHON_VARIANT="2.7"
|
||||
|
||||
# vim: et
|
||||
|
|
|
@ -4,18 +4,31 @@ git clone --depth=1 git://github.com/powerline/deps tests/bot-ci/deps
|
|||
|
||||
. tests/bot-ci/scripts/common/main.sh
|
||||
|
||||
sudo apt-get install -qq screen zsh tcsh mksh busybox socat realpath
|
||||
|
||||
if test -n "$USE_UCS2_PYTHON" ; then
|
||||
for variant in $UCS2_PYTHON_VARIANTS ; do
|
||||
archive="${PWD:-$(pwd)}/tests/bot-ci/deps/cpython-ucs2/cpython-ucs2-${variant}.tar.gz"
|
||||
sudo sh -c "cd /opt && tar xzvf $archive"
|
||||
done
|
||||
pip install virtualenvwrapper
|
||||
set +e
|
||||
. virtualenvwrapper.sh
|
||||
set -e
|
||||
archive="${PWD:-$(pwd)}/tests/bot-ci/deps/cpython-ucs2/cpython-ucs2-${UCS2_PYTHON_VARIANT}.tar.gz"
|
||||
sudo sh -c "cd /opt && tar xzf $archive"
|
||||
PYTHON="/opt/cpython-ucs2-$UCS2_PYTHON_VARIANT/bin/python$UCS2_PYTHON_VARIANT"
|
||||
export LD_LIBRARY_PATH=/opt/cpython-ucs2-$UCS2_PYTHON_VARIANT/lib
|
||||
set +e
|
||||
mkvirtualenv -p "$PYTHON" cpython-ucs2-$UCS2_PYTHON_VARIANT
|
||||
set -e
|
||||
pip install .
|
||||
pip install --no-deps tests/bot-ci/deps/wheels/ucs2-CPython-${UCS2_PYTHON_VARIANT}*/*.whl
|
||||
else
|
||||
pip install .
|
||||
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
|
||||
|
||||
pip install .
|
||||
|
||||
pip install --no-deps tests/bot-ci/deps/wheels/$PYTHON_SUFFIX/*.whl
|
||||
|
||||
sudo apt-get install -qq screen zsh tcsh mksh busybox socat
|
||||
# Travis has too outdated fish. It cannot be used for tests.
|
||||
# sudo apt-get install fish
|
||||
true
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
FAILED=0
|
||||
|
||||
if test -z "$VIM" ; then
|
||||
if test -n "$USE_UCS2_PYTHON" ; then
|
||||
NEW_VIM="$PWD/tests/bot-ci/deps/vim/tip-$UCS2_PYTHON_VARIANT-double/vim"
|
||||
else
|
||||
if test "$PYTHON_IMPLEMENTATION" != "CPython" ; then
|
||||
exit 0
|
||||
fi
|
||||
|
@ -13,6 +16,7 @@ if test -z "$VIM" ; then
|
|||
else
|
||||
VIMS="NEW_VIM"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
NEW_VIM="$VIM"
|
||||
OLD_VIM="$VIM"
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
. tests/bot-ci/scripts/common/main.sh
|
||||
|
||||
FAILED=0
|
||||
|
||||
if test -n "$USE_UCS2_PYTHON" ; then
|
||||
export LD_LIBRARY_PATH=/opt/cpython-ucs2-$UCS2_PYTHON_VARIANT/lib
|
||||
set +e
|
||||
. virtualenvwrapper.sh
|
||||
workon cpython-ucs2-$UCS2_PYTHON_VARIANT
|
||||
set -e
|
||||
fi
|
||||
|
||||
export PYTHON="${PYTHON:=python}"
|
||||
export PYTHONPATH="${PYTHONPATH}:`realpath .`"
|
||||
for script in tests/run_*_tests.sh ; do
|
||||
|
|
|
@ -73,6 +73,7 @@ run() {
|
|||
DIR2="${DIR2}" \
|
||||
XDG_CONFIG_HOME="$PWD/tests/shell/fish_home" \
|
||||
IPYTHONDIR="$PWD/tests/shell/ipython_home" \
|
||||
PYTHONPATH="${PWD}${PYTHONPATH:+:}$PYTHONPATH" \
|
||||
POWERLINE_SHELL_CONTINUATION=$additional_prompts \
|
||||
POWERLINE_SHELL_SELECT=$additional_prompts \
|
||||
POWERLINE_COMMAND="${POWERLINE_COMMAND} -p $PWD/powerline/config_files" \
|
||||
|
|
|
@ -16,7 +16,7 @@ from powerline.lib.monotonic import monotonic
|
|||
from tests import TestCase, SkipTest
|
||||
|
||||
|
||||
INOTIFY_DIR = 'inotify' + os.environ.get('PYTHON', '')
|
||||
INOTIFY_DIR = 'inotify' + os.path.basename(os.environ.get('PYTHON', ''))
|
||||
|
||||
|
||||
def clear_dir(dir):
|
||||
|
|
Loading…
Reference in New Issue