summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2015-07-25 01:32:05 +0200
committerAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2017-03-29 13:29:58 +0200
commitd5f24fed13339d01424c4f7748c239ae33e0b606 (patch)
tree97bf44213c27e4903752d4fb36e7583f531f9af4
parent4f3cb4335c6d934c34d851efa587c525e6fcd876 (diff)
downloadbcfg2-d5f24fed13339d01424c4f7748c239ae33e0b606.tar.gz
bcfg2-d5f24fed13339d01424c4f7748c239ae33e0b606.tar.bz2
bcfg2-d5f24fed13339d01424c4f7748c239ae33e0b606.zip
travis-ci: Also run tests with python2.4 and python2.5
-rw-r--r--.travis.yml17
-rwxr-xr-xtestsuite/install.sh44
-rwxr-xr-xtestsuite/prepare-python.sh8
-rw-r--r--testsuite/requirements-legacy.txt13
4 files changed, 57 insertions, 25 deletions
diff --git a/.travis.yml b/.travis.yml
index f51637ccd..6a061b233 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,14 +2,15 @@ sudo: false
language: python
matrix:
include:
+ - env: PYTHON=2.4
+ - env: PYTHON=2.5
- python: "2.6"
- env: WITH_OPTIONAL_DEPS=no TEST_SPHINX=no
- - python: "2.6"
- env: WITH_OPTIONAL_DEPS=yes TEST_SPHINX=no
- - python: "2.7_with_system_site_packages"
- env: WITH_OPTIONAL_DEPS=no TEST_SPHINX=no
+ - python: "2.7"
- python: "2.7_with_system_site_packages"
env: WITH_OPTIONAL_DEPS=yes TEST_SPHINX=yes
+before_install:
+ - testsuite/prepare-python.sh
+ - if test -d "$HOME/custom-virtualenv/"; then source "$HOME/custom-virtualenv/bin/activate"; fi
install:
- testsuite/install.sh
- pip install -e .
@@ -29,7 +30,13 @@ notifications:
use_notice: true
addons:
apt:
+ sources:
+ - deadsnakes
packages:
+ - python2.4
+ - python2.4-dev
+ - python2.5
+ - python2.5-dev
- swig
- libxml2-utils
- yum
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