diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-21 09:08:44 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-21 13:33:20 -0400 |
commit | 6b70e18c5f4c4405299e54db7fa80e93dab81f0b (patch) | |
tree | f34485a8f348090fba46b08fad505523d40d1b9b | |
parent | fe716cc6c541239a34d55c0ca5812379a821779a (diff) | |
download | bcfg2-6b70e18c5f4c4405299e54db7fa80e93dab81f0b.tar.gz bcfg2-6b70e18c5f4c4405299e54db7fa80e93dab81f0b.tar.bz2 bcfg2-6b70e18c5f4c4405299e54db7fa80e93dab81f0b.zip |
tweaked travis-ci stuff to build for py2.6, py3k, with/without optional deps
-rw-r--r-- | .travis.yml | 23 | ||||
-rwxr-xr-x | testsuite/before_install.sh | 8 | ||||
-rwxr-xr-x | testsuite/install.sh | 16 | ||||
-rw-r--r-- | testsuite/requirements.txt | 5 |
4 files changed, 47 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 62963f674..66b0ea87b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,29 @@ language: python python: - "2.6" - "2.7" + - "3.2" +env: + - WITH_OPTIONAL_DEPS=yes + - WITH_OPTIONAL_DEPS=no +matrix: + exclude: + - python: 3.2 + env: WITH_OPTIONAL_DEPS=yes +before_install: + - testsuite/before_install.sh install: - - pip install -r testsuite/requirements.txt --use-mirrors + - testsuite/install.sh - pip install -e . script: - nosetests testsuite +branches: + except: + - maint + - 1.1.0-stable + - py3k +notifications: + email: chris.a.st.pierre@gmail.com + irc: + channels: + - "irc.freenode.org#bcfg2" + use_notice: true diff --git a/testsuite/before_install.sh b/testsuite/before_install.sh new file mode 100755 index 000000000..25e864fed --- /dev/null +++ b/testsuite/before_install.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# before_install script for Travis-CI + +apt-get update -qq +if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then + apt-get install -qq python-selinux python-pylibacl +fi diff --git a/testsuite/install.sh b/testsuite/install.sh new file mode 100755 index 000000000..494a6f0a1 --- /dev/null +++ b/testsuite/install.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# install script for Travis-CI + +pip install -r testsuite/requirements.txt --use-mirrors + +if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then + pip install --use-mirrors genshi cheetah django<1.4 M2Crypto +else + # python < 2.6 requires M2Crypto for SSL communication, not just + # for encryption support + PYVER=$(python -c 'import sys;print ".".join(str(v) for v in sys.version_info[0:2])') + if [[ $PYVER == "2.5" || $PYVER == "2.4" ]]; then + pip install --use-mirrors M2crypto + fi +fi diff --git a/testsuite/requirements.txt b/testsuite/requirements.txt index f35973976..39418e98b 100644 --- a/testsuite/requirements.txt +++ b/testsuite/requirements.txt @@ -1,7 +1,4 @@ lxml nose -genshi -cheetah -sphinx mock -django<1.4 +sphinx |