53 lines
1.5 KiB
INI
53 lines
1.5 KiB
INI
# Tox (http://tox.testrun.org/) is a tool for running tests
|
|
# in multiple virtualenvs. This configuration file will run the
|
|
# test suite on all supported python versions. To use it, "pip install tox"
|
|
# and then run "tox" from this directory.
|
|
|
|
|
|
[tox]
|
|
envlist = {coverage,nocoverage}-{dj18,dj111}-{pg,sqlite},package
|
|
|
|
[testenv]
|
|
whitelist_externals =
|
|
/bin/mv
|
|
setenv =
|
|
AUTHENTIC2_SETTINGS_FILE=tests/settings.py
|
|
DJANGO_SETTINGS_MODULE=authentic2.settings
|
|
sqlite: DB_ENGINE=sqlite3
|
|
pg: DB_ENGINE=postgresql_psycopg2
|
|
coverage: COVERAGE=--junit-xml=junit.xml --cov=src --cov-report xml
|
|
usedevelop =
|
|
coverage: true
|
|
nocoverage: false
|
|
deps =
|
|
dj18: django>1.8,<1.9
|
|
dj18: django-tables2<1.1
|
|
dj111: django>1.11,<1.12
|
|
dj111: django-tables<2.0
|
|
pg: psycopg2
|
|
pytest>=3.3.0
|
|
pytest-cov
|
|
pytest-random
|
|
pytest-django
|
|
ldaptools
|
|
http://git.entrouvert.org/authentic.git/snapshot/authentic-master.tar.bz2
|
|
django-kerberos
|
|
commands =
|
|
./getlasso.sh
|
|
py.test {env:COVERAGE:} {posargs:tests}
|
|
coverage: mv coverage.xml coverage-{envname}.xml
|
|
|
|
[testenv:package]
|
|
# eobuilder is not on pypi, too bad
|
|
whitelist_externals =
|
|
/bin/sh
|
|
deps = setuptools
|
|
pip<8
|
|
pyasn1
|
|
ndg-httpsclient
|
|
pyopenssl
|
|
skipdist = True
|
|
commands =
|
|
pip install -U --find-links https://jenkins.entrouvert.org/packages/ eobuilder
|
|
sh -c "sudo -u eobuilder -E env HOME=/var/lib/eobuilder PATH=$PATH $VIRTUAL_ENV/bin/eobuilder-ctl -d wheezy,jessie {posargs:authentic2-auth-kerberos}"
|