diff options
author | David Wilson <dw@botanicus.net> | 2014-04-21 17:51:38 +0100 |
---|---|---|
committer | David Wilson <dw@botanicus.net> | 2014-04-21 17:51:38 +0100 |
commit | dde2d33d2477a607bb149b5a0519737d337a063c (patch) | |
tree | ed5b5322915a2f191f2e417fa31520e371503cd2 /misc | |
parent | fb130ea7fdc14f263293ffd0d8825b514b34e354 (diff) |
Tidy up CI/test related files
Move them under misc/.
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/runtests-travisci.sh | 40 | ||||
-rwxr-xr-x | misc/runtests-ubuntu-12-04.sh | 37 | ||||
-rw-r--r-- | misc/tox.ini | 88 |
3 files changed, 165 insertions, 0 deletions
diff --git a/misc/runtests-travisci.sh b/misc/runtests-travisci.sh new file mode 100755 index 0000000..34cef6a --- /dev/null +++ b/misc/runtests-travisci.sh @@ -0,0 +1,40 @@ +#!/bin/bash -ex + +quiet() { + "$@" > /tmp/$$ || { cat /tmp/$$; return 1; } +} + +# Delete Travis PyPy or it'll supercede the PPA version. +rm -rf /usr/local/pypy/bin /usr/local/lib/pypy2.7 +find /usr/lib -name '*setuptools*' | xargs rm -rf +find /usr/local/lib -name '*setuptools*' | xargs rm -rf + +quiet add-apt-repository -y ppa:fkrull/deadsnakes +quiet add-apt-repository -y ppa:pypy +quiet apt-get -qq update +quiet apt-get install --force-yes -qq \ + python{2.5,2.6,2.7,3.1,3.2,3.3}-dev \ + pypy-dev \ + libffi-dev + +wget -qO ez_setup_24.py \ + https://bitbucket.org/pypa/setuptools/raw/bootstrap-py24/ez_setup.py +wget -q https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py + +quiet python2.5 ez_setup_24.py +quiet python2.6 ez_setup.py +quiet python2.7 ez_setup.py +quiet python3.1 ez_setup.py +quiet python3.2 ez_setup.py +quiet python3.3 ez_setup.py +quiet pypy ez_setup.py + +quiet python2.5 -measy_install pytest +quiet python2.6 -measy_install pytest cffi +quiet python2.7 -measy_install pytest cffi +quiet python3.1 -measy_install pytest cffi argparse +quiet python3.2 -measy_install pytest cffi +quiet python3.3 -measy_install pytest cffi +quiet pypy -measy_install pytest + +source misc/runtests-ubuntu-12-04.sh diff --git a/misc/runtests-ubuntu-12-04.sh b/misc/runtests-ubuntu-12-04.sh new file mode 100755 index 0000000..ad2df64 --- /dev/null +++ b/misc/runtests-ubuntu-12-04.sh @@ -0,0 +1,37 @@ +#!/bin/bash -ex + +quiet() { + "$@" > /tmp/$$ || { cat /tmp/$$; return 1; } +} + +clean() { + git clean -qdfx + find /usr/local/lib -name '*lmdb*' | xargs rm -rf + find /usr/lib -name '*lmdb*' | xargs rm -rf +} + +native() { + clean + quiet $1 setup.py develop + $2 tests || fail=1 +} + +cffi() { + clean + LMDB_FORCE_CFFI=1 quiet $1 setup.py install + $2 tests || fail=1 +} + +native python2.5 py.test-2.5 +native python2.6 py.test-2.6 +native python2.7 py.test-2.7 +native python3.3 py.test-3.3 +cffi pypy "pypy -mpy.test" +cffi python2.6 py.test-2.6 +cffi python2.7 py.test-2.7 +cffi python3.1 py.test-3.1 +cffi python3.2 py.test-3.2 +cffi python3.3 py.test-3.3 + +[ "$fail" ] && exit 1 +exit 0 diff --git a/misc/tox.ini b/misc/tox.ini new file mode 100644 index 0000000..2bbe3a8 --- /dev/null +++ b/misc/tox.ini @@ -0,0 +1,88 @@ +[tox] +; py25_c disabled because TRAVISCI RAGE +envlist = pypy_cffi,py26_cffi,py27_cffi,py30_cffi,py31_cffi,py32_cffi,py33_cffi,py26_c,py27_c,py33_c +skipsdist = True + +[testenv] +install_command = pip install {opts} {packages} +commands = + pip install -e . + python -mpytest ./tests + +[testenv:pypy_cffi] +basepython = pypy +deps = + pytest + +[testenv:py26_cffi] +basepython = python2.6 +deps = + pytest + cffi +setenv = LMDB_FORCE_CFFI=1 + +[testenv:py27_cffi] +basepython = python2.7 +deps = + pytest + cffi +setenv = LMDB_FORCE_CFFI=1 + +[testenv:py30_cffi] +basepython = python3.0 +deps = + pytest + cffi +setenv = LMDB_FORCE_CFFI=1 + +[testenv:py31_cffi] +basepython = python3.1 +deps = + pytest + cffi +setenv = LMDB_FORCE_CFFI=1 + +[testenv:py32_cffi] +basepython = python3.2 +deps = + pytest + cffi +setenv = LMDB_FORCE_CFFI=1 + +[testenv:py33_cffi] +basepython = python3.3 +deps = + pytest + cffi +setenv = LMDB_FORCE_CFFI=1 + +[testenv:py34_cffi] +basepython = python3.4 +deps = + pytest + cffi +setenv = LMDB_FORCE_CFFI=1 + +[testenv:py25_c] +deps = + pytest +setenv = PIP_INSECURE=1 +basepython = python2.5 + +[testenv:py26_c] +deps = + pytest +basepython = python2.6 + +[testenv:py27_c] +deps = + pytest +basepython = python2.7 + +[testenv:py33_c] +deps = + pytest +basepython = python3.3 + +;[testenv:py34_c] +;basepython = python3.4 |