2015-01-28 07:56:12 -05:00
|
|
|
# Tox (http://tox.testrun.org/) is a tool for running tests in
|
|
|
|
|
# multiple virtualenvs. To use it, "pip install tox" and then run
|
|
|
|
|
# "tox" from this directory.
|
2014-11-22 09:02:52 -05:00
|
|
|
|
|
|
|
|
[tox]
|
2015-07-10 12:34:08 -04:00
|
|
|
skipsdist = true
|
2017-01-18 13:41:11 -05:00
|
|
|
envlist = modification,py{26,33,34,35,36},cover,lint
|
2014-11-22 09:02:52 -05:00
|
|
|
|
2016-01-19 12:22:53 -05:00
|
|
|
# nosetest -v => more verbose output, allows to detect busy waiting
|
|
|
|
|
# loops, especially on Travis
|
|
|
|
|
|
2017-05-08 14:54:12 -04:00
|
|
|
[base]
|
2017-05-11 13:06:05 -04:00
|
|
|
# wraps pip install to use pinned versions of dependencies
|
|
|
|
|
pip_install = {toxinidir}/tools/pip_install.sh
|
2016-01-11 13:01:25 -05:00
|
|
|
# packages installed separately to ensure that downstream deps problems
|
2015-10-16 18:17:31 -04:00
|
|
|
# are detected, c.f. #1002
|
2017-05-08 14:54:12 -04:00
|
|
|
core_commands =
|
2017-05-11 13:06:05 -04:00
|
|
|
{[base]pip_install} -e acme[dev]
|
2016-12-06 23:39:16 -05:00
|
|
|
nosetests -v acme --processes=-1
|
2017-05-11 13:06:05 -04:00
|
|
|
{[base]pip_install} -e .[dev]
|
2016-12-06 23:39:16 -05:00
|
|
|
nosetests -v certbot --processes=-1 --process-timeout=100
|
2017-05-08 14:54:12 -04:00
|
|
|
core_install_args = -e acme[dev] -e .[dev]
|
|
|
|
|
core_paths = acme/acme certbot
|
|
|
|
|
|
|
|
|
|
plugin_commands =
|
2017-05-11 13:06:05 -04:00
|
|
|
{[base]pip_install} -e certbot-apache
|
2016-12-06 23:39:16 -05:00
|
|
|
nosetests -v certbot_apache --processes=-1 --process-timeout=80
|
2017-05-11 13:06:05 -04:00
|
|
|
{[base]pip_install} -e certbot-nginx
|
2016-12-06 23:39:16 -05:00
|
|
|
nosetests -v certbot_nginx --processes=-1
|
2017-05-08 14:54:12 -04:00
|
|
|
plugin_install_args = -e certbot-apache -e certbot-nginx
|
|
|
|
|
plugin_paths = certbot-apache/certbot_apache certbot-nginx/certbot_nginx
|
|
|
|
|
|
2017-05-02 13:12:23 -04:00
|
|
|
dns_plugin_commands =
|
|
|
|
|
pip install -e certbot-dns-cloudflare
|
|
|
|
|
nosetests -v certbot_dns_cloudflare --processes=-1
|
2017-04-28 17:53:07 -04:00
|
|
|
pip install -e certbot-dns-digitalocean
|
|
|
|
|
nosetests -v certbot_dns_digitalocean --processes=-1
|
|
|
|
|
dns_plugin_install_args = -e certbot-dns-cloudflare -e certbot-dns-digitalocean
|
|
|
|
|
dns_plugin_paths = certbot-dns-cloudflare/certbot_dns_cloudflare certbot-dns-digitalocean/certbot_dns_digitalocean
|
2017-05-02 13:12:23 -04:00
|
|
|
|
2017-05-08 14:54:12 -04:00
|
|
|
compatibility_install_args = -e certbot-compatibility-test
|
|
|
|
|
compatibility_paths = certbot-compatibility-test/certbot_compatibility_test
|
|
|
|
|
|
|
|
|
|
other_commands =
|
2017-05-11 13:06:05 -04:00
|
|
|
{[base]pip_install} -e letshelp-certbot
|
2016-12-06 23:39:16 -05:00
|
|
|
nosetests -v letshelp_certbot --processes=-1
|
2017-05-01 17:49:12 -04:00
|
|
|
python tests/lock_test.py
|
2017-05-08 14:54:12 -04:00
|
|
|
other_install_args = -e letshelp-certbot
|
|
|
|
|
other_paths = letshelp-certbot/letshelp_certbot tests/lock_test.py
|
|
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
|
commands =
|
|
|
|
|
{[base]core_commands}
|
|
|
|
|
{[base]plugin_commands}
|
|
|
|
|
{[base]other_commands}
|
2014-11-22 09:12:33 -05:00
|
|
|
|
2015-02-08 07:59:47 -05:00
|
|
|
setenv =
|
|
|
|
|
PYTHONPATH = {toxinidir}
|
2015-03-18 11:04:27 -04:00
|
|
|
PYTHONHASHSEED = 0
|
|
|
|
|
# https://testrun.org/tox/latest/example/basic.html#special-handling-of-pythonhas
|
2015-02-08 07:59:47 -05:00
|
|
|
|
2016-09-14 13:31:31 -04:00
|
|
|
# cffi<=1.7 is required for oldest tests due to
|
|
|
|
|
# https://bitbucket.org/cffi/cffi/commits/18cdf37d6b2691301a15b0e54f49757ebd4ed0f2?at=default
|
2016-12-01 13:47:08 -05:00
|
|
|
# requests<=2.11.1 required for oldest tests due to
|
2016-11-21 20:56:22 -05:00
|
|
|
# https://github.com/shazow/urllib3/pull/930
|
2016-01-06 21:51:42 -05:00
|
|
|
deps =
|
2016-09-14 13:31:31 -04:00
|
|
|
py{26,27}-oldest: cffi<=1.7
|
2016-01-06 21:51:42 -05:00
|
|
|
py{26,27}-oldest: cryptography==0.8
|
|
|
|
|
py{26,27}-oldest: configargparse==0.10.0
|
|
|
|
|
py{26,27}-oldest: PyOpenSSL==0.13
|
2016-12-01 13:47:08 -05:00
|
|
|
py{26,27}-oldest: requests<=2.11.1
|
2016-01-06 21:51:42 -05:00
|
|
|
|
2016-12-20 19:24:33 -05:00
|
|
|
[testenv:py27_install]
|
|
|
|
|
basepython = python2.7
|
|
|
|
|
commands =
|
2017-05-11 13:06:05 -04:00
|
|
|
{[base]pip_install} {[base]core_install_args} {[base]plugin_install_args} {[base]dns_plugin_install_args} {[base]other_install_args}
|
2016-12-20 19:24:33 -05:00
|
|
|
|
2014-11-27 14:30:56 -05:00
|
|
|
[testenv:cover]
|
2015-01-28 07:56:12 -05:00
|
|
|
basepython = python2.7
|
2014-11-27 14:30:56 -05:00
|
|
|
commands =
|
2017-05-11 13:06:05 -04:00
|
|
|
{[base]pip_install} {[base]core_install_args} {[base]plugin_install_args} {[base]dns_plugin_install_args} {[base]other_install_args}
|
2015-05-10 12:52:32 -04:00
|
|
|
./tox.cover.sh
|
2014-11-27 14:30:56 -05:00
|
|
|
|
2014-11-22 09:12:33 -05:00
|
|
|
[testenv:lint]
|
2015-10-11 12:01:52 -04:00
|
|
|
# recent versions of pylint do not support Python 2.6 (#97, #187)
|
2015-01-28 07:56:12 -05:00
|
|
|
basepython = python2.7
|
2015-07-10 09:40:51 -04:00
|
|
|
# separating into multiple invocations disables cross package
|
|
|
|
|
# duplicate code checking; if one of the commands fails, others will
|
|
|
|
|
# continue, but tox return code will reflect previous error
|
2014-11-27 14:13:21 -05:00
|
|
|
commands =
|
2017-05-11 13:06:05 -04:00
|
|
|
{[base]pip_install} -q {[base]core_install_args} {[base]plugin_install_args} {[base]dns_plugin_install_args} {[base]compatibility_install_args} {[base]other_install_args}
|
2017-05-02 13:12:23 -04:00
|
|
|
pylint --reports=n --rcfile=.pylintrc {[base]core_paths} {[base]plugin_paths} {[base]dns_plugin_paths} {[base]compatibility_paths} {[base]other_paths}
|
2015-12-16 22:52:35 -05:00
|
|
|
|
2017-03-18 22:10:10 -04:00
|
|
|
[testenv:mypy]
|
|
|
|
|
basepython = python3.4
|
|
|
|
|
commands =
|
2017-05-11 13:06:05 -04:00
|
|
|
{[base]pip_install} mypy
|
|
|
|
|
{[base]pip_install} -q {[base]core_install_args} {[base]plugin_install_args} {[base]dns_plugin_install_args} {[base]compatibility_install_args} {[base]other_install_args}
|
2017-05-02 13:12:23 -04:00
|
|
|
mypy --py2 --ignore-missing-imports {[base]core_paths} {[base]plugin_paths} {[base]dns_plugin_paths} {[base]compatibility_paths} {[base]other_paths}
|
2017-03-18 22:10:10 -04:00
|
|
|
|
2015-12-22 18:50:48 -05:00
|
|
|
[testenv:apacheconftest]
|
2015-12-18 03:17:22 -05:00
|
|
|
#basepython = python2.7
|
2015-12-16 22:52:35 -05:00
|
|
|
commands =
|
2017-05-11 13:06:05 -04:00
|
|
|
{[base]pip_install} {[base]core_install_args} {[base]plugin_install_args} {[base]compatibility_install_args} {[base]other_install_args}
|
2016-04-13 19:30:57 -04:00
|
|
|
{toxinidir}/certbot-apache/certbot_apache/tests/apache-conf-files/apache-conf-test --debian-modules
|
2016-04-10 14:44:28 -04:00
|
|
|
|
2016-08-10 19:43:15 -04:00
|
|
|
[testenv:nginxroundtrip]
|
|
|
|
|
commands =
|
2017-05-11 13:06:05 -04:00
|
|
|
{[base]pip_install} {[base]core_install_args} -e certbot-nginx
|
2016-08-10 19:43:15 -04:00
|
|
|
python certbot-compatibility-test/nginx/roundtrip.py certbot-compatibility-test/nginx/nginx-roundtrip-testdata
|
2016-01-08 16:55:52 -05:00
|
|
|
|
2016-10-28 18:05:25 -04:00
|
|
|
# This is a duplication of the command line in testenv:le_auto to
|
|
|
|
|
# allow users to run the modification check by running `tox`
|
|
|
|
|
[testenv:modification]
|
|
|
|
|
commands =
|
|
|
|
|
{toxinidir}/tests/modification-check.sh
|
|
|
|
|
|
2016-08-10 19:33:56 -04:00
|
|
|
[testenv:apache_compat]
|
|
|
|
|
commands =
|
|
|
|
|
docker build -t certbot-compatibility-test -f certbot-compatibility-test/Dockerfile .
|
|
|
|
|
docker build -t apache-compat -f certbot-compatibility-test/Dockerfile-apache .
|
|
|
|
|
docker run --rm -it apache-compat -c apache.tar.gz -vvvv
|
|
|
|
|
whitelist_externals =
|
|
|
|
|
docker
|
|
|
|
|
passenv = DOCKER_*
|
|
|
|
|
|
|
|
|
|
[testenv:nginx_compat]
|
|
|
|
|
commands =
|
|
|
|
|
docker build -t certbot-compatibility-test -f certbot-compatibility-test/Dockerfile .
|
|
|
|
|
docker build -t nginx-compat -f certbot-compatibility-test/Dockerfile-nginx .
|
|
|
|
|
docker run --rm -it nginx-compat -c nginx.tar.gz -vvvv
|
|
|
|
|
whitelist_externals =
|
|
|
|
|
docker
|
|
|
|
|
passenv = DOCKER_*
|
2016-11-10 16:15:17 -05:00
|
|
|
|
|
|
|
|
[testenv:le_auto_precise]
|
|
|
|
|
# At the moment, this tests under Python 2.7 only, as only that version is
|
|
|
|
|
# readily available on the Precise Docker image.
|
|
|
|
|
commands =
|
|
|
|
|
docker build -f letsencrypt-auto-source/Dockerfile.precise -t lea letsencrypt-auto-source
|
|
|
|
|
docker run --rm -t -i lea
|
|
|
|
|
whitelist_externals =
|
|
|
|
|
docker
|
|
|
|
|
passenv = DOCKER_*
|
|
|
|
|
|
|
|
|
|
[testenv:le_auto_trusty]
|
|
|
|
|
# At the moment, this tests under Python 2.7 only, as only that version is
|
|
|
|
|
# readily available on the Trusty Docker image.
|
|
|
|
|
commands =
|
|
|
|
|
{toxinidir}/tests/modification-check.sh
|
|
|
|
|
docker build -f letsencrypt-auto-source/Dockerfile.trusty -t lea letsencrypt-auto-source
|
|
|
|
|
docker run --rm -t -i lea
|
|
|
|
|
whitelist_externals =
|
|
|
|
|
docker
|
2017-02-28 18:17:07 -05:00
|
|
|
passenv =
|
|
|
|
|
DOCKER_*
|
|
|
|
|
TRAVIS_BRANCH
|
2016-11-10 17:01:15 -05:00
|
|
|
|
|
|
|
|
[testenv:le_auto_wheezy]
|
|
|
|
|
# At the moment, this tests under Python 2.7 only, as only that version is
|
|
|
|
|
# readily available on the Wheezy Docker image.
|
|
|
|
|
commands =
|
|
|
|
|
docker build -f letsencrypt-auto-source/Dockerfile.wheezy -t lea letsencrypt-auto-source
|
|
|
|
|
docker run --rm -t -i lea
|
|
|
|
|
whitelist_externals =
|
|
|
|
|
docker
|
|
|
|
|
passenv = DOCKER_*
|
2016-11-10 18:05:03 -05:00
|
|
|
|
|
|
|
|
[testenv:le_auto_centos6]
|
|
|
|
|
# At the moment, this tests under Python 2.6 only, as only that version is
|
|
|
|
|
# readily available on the CentOS 6 Docker image.
|
|
|
|
|
commands =
|
|
|
|
|
docker build -f letsencrypt-auto-source/Dockerfile.centos6 -t lea letsencrypt-auto-source
|
|
|
|
|
docker run --rm -t -i lea
|
|
|
|
|
whitelist_externals =
|
|
|
|
|
docker
|
|
|
|
|
passenv = DOCKER_*
|