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: "3.4"
|
||||||
- python: "pypy"
|
- python: "pypy"
|
||||||
- python: "pypy3"
|
- python: "pypy3"
|
||||||
|
- env: >-
|
||||||
|
USE_UCS2_PYTHON=1
|
||||||
|
UCS2_PYTHON_VARIANT="2.6"
|
||||||
|
- env: >-
|
||||||
|
USE_UCS2_PYTHON=1
|
||||||
|
UCS2_PYTHON_VARIANT="2.7"
|
||||||
|
|
||||||
# vim: et
|
# 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
|
. 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
|
if test -n "$USE_UCS2_PYTHON" ; then
|
||||||
for variant in $UCS2_PYTHON_VARIANTS ; do
|
pip install virtualenvwrapper
|
||||||
archive="${PWD:-$(pwd)}/tests/bot-ci/deps/cpython-ucs2/cpython-ucs2-${variant}.tar.gz"
|
set +e
|
||||||
sudo sh -c "cd /opt && tar xzvf $archive"
|
. virtualenvwrapper.sh
|
||||||
done
|
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
|
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.
|
# Travis has too outdated fish. It cannot be used for tests.
|
||||||
# sudo apt-get install fish
|
# sudo apt-get install fish
|
||||||
true
|
true
|
||||||
|
|
|
@ -3,15 +3,19 @@
|
||||||
FAILED=0
|
FAILED=0
|
||||||
|
|
||||||
if test -z "$VIM" ; then
|
if test -z "$VIM" ; then
|
||||||
if test "$PYTHON_IMPLEMENTATION" != "CPython" ; then
|
if test -n "$USE_UCS2_PYTHON" ; then
|
||||||
exit 0
|
NEW_VIM="$PWD/tests/bot-ci/deps/vim/tip-$UCS2_PYTHON_VARIANT-double/vim"
|
||||||
fi
|
|
||||||
NEW_VIM="$PWD/tests/bot-ci/deps/vim/tip-$PYTHON_VERSION/vim"
|
|
||||||
OLD_VIM="$PWD/tests/bot-ci/deps/vim/v7-0-112-$PYTHON_VERSION/vim"
|
|
||||||
if test -e "$OLD_VIM" ; then
|
|
||||||
VIMS="NEW_VIM OLD_VIM"
|
|
||||||
else
|
else
|
||||||
VIMS="NEW_VIM"
|
if test "$PYTHON_IMPLEMENTATION" != "CPython" ; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
NEW_VIM="$PWD/tests/bot-ci/deps/vim/tip-$PYTHON_VERSION/vim"
|
||||||
|
OLD_VIM="$PWD/tests/bot-ci/deps/vim/v7-0-112-$PYTHON_VERSION/vim"
|
||||||
|
if test -e "$OLD_VIM" ; then
|
||||||
|
VIMS="NEW_VIM OLD_VIM"
|
||||||
|
else
|
||||||
|
VIMS="NEW_VIM"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
NEW_VIM="$VIM"
|
NEW_VIM="$VIM"
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
. tests/bot-ci/scripts/common/main.sh
|
||||||
|
|
||||||
FAILED=0
|
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 PYTHON="${PYTHON:=python}"
|
||||||
export PYTHONPATH="${PYTHONPATH}:`realpath .`"
|
export PYTHONPATH="${PYTHONPATH}:`realpath .`"
|
||||||
for script in tests/run_*_tests.sh ; do
|
for script in tests/run_*_tests.sh ; do
|
||||||
|
|
|
@ -73,6 +73,7 @@ run() {
|
||||||
DIR2="${DIR2}" \
|
DIR2="${DIR2}" \
|
||||||
XDG_CONFIG_HOME="$PWD/tests/shell/fish_home" \
|
XDG_CONFIG_HOME="$PWD/tests/shell/fish_home" \
|
||||||
IPYTHONDIR="$PWD/tests/shell/ipython_home" \
|
IPYTHONDIR="$PWD/tests/shell/ipython_home" \
|
||||||
|
PYTHONPATH="${PWD}${PYTHONPATH:+:}$PYTHONPATH" \
|
||||||
POWERLINE_SHELL_CONTINUATION=$additional_prompts \
|
POWERLINE_SHELL_CONTINUATION=$additional_prompts \
|
||||||
POWERLINE_SHELL_SELECT=$additional_prompts \
|
POWERLINE_SHELL_SELECT=$additional_prompts \
|
||||||
POWERLINE_COMMAND="${POWERLINE_COMMAND} -p $PWD/powerline/config_files" \
|
POWERLINE_COMMAND="${POWERLINE_COMMAND} -p $PWD/powerline/config_files" \
|
||||||
|
|
|
@ -16,7 +16,7 @@ from powerline.lib.monotonic import monotonic
|
||||||
from tests import TestCase, SkipTest
|
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):
|
def clear_dir(dir):
|
||||||
|
|
Loading…
Reference in New Issue