diff options
author | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2015-07-25 01:32:05 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2017-03-29 13:29:58 +0200 |
commit | d5f24fed13339d01424c4f7748c239ae33e0b606 (patch) | |
tree | 97bf44213c27e4903752d4fb36e7583f531f9af4 /testsuite | |
parent | 4f3cb4335c6d934c34d851efa587c525e6fcd876 (diff) | |
download | bcfg2-d5f24fed13339d01424c4f7748c239ae33e0b606.tar.gz bcfg2-d5f24fed13339d01424c4f7748c239ae33e0b606.tar.bz2 bcfg2-d5f24fed13339d01424c4f7748c239ae33e0b606.zip |
travis-ci: Also run tests with python2.4 and python2.5
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/install.sh | 44 | ||||
-rwxr-xr-x | testsuite/prepare-python.sh | 8 | ||||
-rw-r--r-- | testsuite/requirements-legacy.txt | 13 |
3 files changed, 45 insertions, 20 deletions
diff --git a/testsuite/install.sh b/testsuite/install.sh index eb569ec56..13a2e9d01 100755 --- a/testsuite/install.sh +++ b/testsuite/install.sh @@ -1,31 +1,35 @@ #!/bin/bash -ex # install script for Travis-CI -pip install --upgrade pip - -pip_wheel() { - pip wheel --find-links="$HOME/.cache/wheels/" --wheel-dir="$HOME/.cache/wheels/" "$@" - pip install --no-index --find-links="$HOME/.cache/wheels/" "$@" -} - -pip_wheel -r testsuite/requirements.txt - PYVER=$(python -c 'import sys;print(".".join(str(v) for v in sys.version_info[0:2]))') -if [[ ${PYVER:0:1} == "2" && $PYVER != "2.7" ]]; then - pip_wheel unittest2 -fi +if [[ ${PYVER:0:1} == "2" && $PYVER != "2.7" && $PYVER != "2.6" ]]; then + pip install -r testsuite/requirements-legacy.txt +else + pip install --upgrade pip + + pip_wheel() { + pip wheel --find-links="$HOME/.cache/wheels/" --wheel-dir="$HOME/.cache/wheels/" "$@" + pip install --no-index --find-links="$HOME/.cache/wheels/" "$@" + } -if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then - pip_wheel PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy python-augeas + pip_wheel -r testsuite/requirements.txt - if [[ ${PYVER:0:1} == "2" ]]; then - pip_wheel cheetah m2crypto + if [[ $PYVER == "2.6" ]]; then + pip_wheel unittest2 + fi - if [[ $PYVER != "2.7" ]]; then - pip_wheel 'django<1.7' 'South<0.8' - else - pip_wheel django + if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then + pip_wheel PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy python-augeas + + if [[ ${PYVER:0:1} == "2" ]]; then + pip_wheel cheetah m2crypto + + if [[ $PYVER != "2.7" ]]; then + pip_wheel 'django<1.7' 'South<0.8' + else + pip_wheel django + fi fi fi fi diff --git a/testsuite/prepare-python.sh b/testsuite/prepare-python.sh new file mode 100755 index 000000000..7b72a6dc4 --- /dev/null +++ b/testsuite/prepare-python.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ -n "$PYTHON" ]; then + echo "Try to use custom python version: $PYTHON" + pip install 'virtualenv<1.8' + mkdir -p "$HOME/custom-virtualenv" + virtualenv -p "python$PYTHON" --use-distribute "$HOME/custom-virtualenv" +fi diff --git a/testsuite/requirements-legacy.txt b/testsuite/requirements-legacy.txt new file mode 100644 index 000000000..87af9cfc6 --- /dev/null +++ b/testsuite/requirements-legacy.txt @@ -0,0 +1,13 @@ +lxml<3.4 +lockfile<0.9 +python-daemon<1.4 +argparse +ssl + +nose +mock<1.1 +unittest2<0.6 +logilab-common==0.53.0 +logilab-astng==0.20.3 +pylint<0.22 +pep8<1.3 |