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
|
|
|
|
2017-05-08 14:54:12 -04:00
|
|
|
[base]
|
2017-06-08 15:22:46 -04:00
|
|
|
# pip installs the requested packages in editable mode
|
|
|
|
|
pip_install = {toxinidir}/tools/pip_install_editable.sh
|
|
|
|
|
# pip installs the requested packages in editable mode and runs unit tests on
|
|
|
|
|
# them. Each package is installed and tested in the order they are provided
|
2017-12-18 15:31:36 -05:00
|
|
|
# before the script moves on to the next package. All dependencies are pinned
|
|
|
|
|
# to a specific version for increased stability for developers.
|
2017-06-08 15:22:46 -04:00
|
|
|
install_and_test = {toxinidir}/tools/install_and_test.sh
|
|
|
|
|
py26_packages =
|
|
|
|
|
acme[dev] \
|
|
|
|
|
.[dev] \
|
|
|
|
|
certbot-apache \
|
|
|
|
|
certbot-dns-cloudflare \
|
|
|
|
|
certbot-dns-digitalocean \
|
|
|
|
|
certbot-dns-google \
|
2017-06-16 19:53:46 -04:00
|
|
|
certbot-dns-rfc2136 \
|
2017-06-08 15:22:46 -04:00
|
|
|
certbot-dns-route53 \
|
|
|
|
|
certbot-nginx \
|
|
|
|
|
letshelp-certbot
|
|
|
|
|
non_py26_packages =
|
|
|
|
|
certbot-dns-cloudxns \
|
|
|
|
|
certbot-dns-dnsimple \
|
2017-06-15 19:41:00 -04:00
|
|
|
certbot-dns-dnsmadeeasy \
|
2017-06-16 17:43:12 -04:00
|
|
|
certbot-dns-luadns \
|
2017-06-08 15:22:46 -04:00
|
|
|
certbot-dns-nsone
|
|
|
|
|
all_packages =
|
|
|
|
|
{[base]py26_packages} {[base]non_py26_packages}
|
|
|
|
|
install_packages =
|
|
|
|
|
{toxinidir}/tools/pip_install_editable.sh {[base]all_packages}
|
|
|
|
|
source_paths =
|
|
|
|
|
acme/acme
|
|
|
|
|
certbot
|
|
|
|
|
certbot-apache/certbot_apache
|
|
|
|
|
certbot-compatibility-test/certbot_compatibility_test
|
|
|
|
|
certbot-dns-cloudflare/certbot_dns_cloudflare
|
|
|
|
|
certbot-dns-cloudxns/certbot_dns_cloudxns
|
|
|
|
|
certbot-dns-digitalocean/certbot_dns_digitalocean
|
|
|
|
|
certbot-dns-dnsimple/certbot_dns_dnsimple
|
2017-06-15 19:41:00 -04:00
|
|
|
certbot-dns-dnsmadeeasy/certbot_dns_dnsmadeeasy
|
2017-06-08 15:22:46 -04:00
|
|
|
certbot-dns-google/certbot_dns_google
|
2017-06-16 17:43:12 -04:00
|
|
|
certbot-dns-luadns/certbot_dns_luadns
|
2017-06-08 15:22:46 -04:00
|
|
|
certbot-dns-nsone/certbot_dns_nsone
|
2017-06-16 19:53:46 -04:00
|
|
|
certbot-dns-rfc2136/certbot_dns_rfc2136
|
2017-06-08 15:22:46 -04:00
|
|
|
certbot-dns-route53/certbot_dns_route53
|
|
|
|
|
certbot-nginx/certbot_nginx
|
|
|
|
|
letshelp-certbot/letshelp_certbot
|
|
|
|
|
tests/lock_test.py
|
2017-05-08 14:54:12 -04:00
|
|
|
|
2017-06-08 15:22:46 -04:00
|
|
|
[testenv:py26]
|
|
|
|
|
commands =
|
|
|
|
|
{[base]install_and_test} {[base]py26_packages}
|
2017-05-01 17:49:12 -04:00
|
|
|
python tests/lock_test.py
|
2017-12-01 16:20:27 -05:00
|
|
|
deps =
|
|
|
|
|
setuptools==36.8.0
|
|
|
|
|
wheel==0.29.0
|
2018-01-03 20:49:22 -05:00
|
|
|
passenv = TRAVIS
|
2017-05-08 14:54:12 -04:00
|
|
|
|
2017-06-21 16:50:48 -04:00
|
|
|
[testenv]
|
2017-05-08 14:54:12 -04:00
|
|
|
commands =
|
2017-06-08 15:22:46 -04:00
|
|
|
{[testenv:py26]commands}
|
2017-06-21 16:50:48 -04:00
|
|
|
{[base]install_and_test} {[base]non_py26_packages}
|
|
|
|
|
setenv =
|
|
|
|
|
PYTHONPATH = {toxinidir}
|
|
|
|
|
PYTHONHASHSEED = 0
|
2018-01-03 20:49:22 -05:00
|
|
|
passenv =
|
|
|
|
|
{[testenv:py26]passenv}
|
2017-06-21 16:50:48 -04:00
|
|
|
|
2017-12-01 16:20:27 -05:00
|
|
|
[testenv:py33]
|
|
|
|
|
commands =
|
|
|
|
|
{[testenv]commands}
|
|
|
|
|
deps =
|
|
|
|
|
wheel==0.29.0
|
2018-01-03 20:49:22 -05:00
|
|
|
passenv =
|
|
|
|
|
{[testenv]passenv}
|
2017-12-01 16:20:27 -05:00
|
|
|
|
2017-06-21 16:50:48 -04:00
|
|
|
[testenv:py27-oldest]
|
|
|
|
|
commands =
|
|
|
|
|
{[testenv]commands}
|
|
|
|
|
setenv =
|
|
|
|
|
{[testenv]setenv}
|
2017-12-18 15:31:36 -05:00
|
|
|
CERTBOT_OLDEST=1
|
2018-01-03 20:49:22 -05:00
|
|
|
passenv =
|
|
|
|
|
{[testenv]passenv}
|
2017-05-19 19:23:53 -04:00
|
|
|
|
2016-12-20 19:24:33 -05:00
|
|
|
[testenv:py27_install]
|
|
|
|
|
basepython = python2.7
|
|
|
|
|
commands =
|
2017-06-08 15:22:46 -04:00
|
|
|
{[base]install_packages}
|
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-06-08 15:22:46 -04:00
|
|
|
{[base]install_packages}
|
2015-05-10 12:52:32 -04:00
|
|
|
./tox.cover.sh
|
2018-01-03 20:49:22 -05:00
|
|
|
passenv =
|
|
|
|
|
{[testenv]passenv}
|
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-06-08 15:22:46 -04:00
|
|
|
{[base]install_packages}
|
|
|
|
|
pylint --reports=n --rcfile=.pylintrc {[base]source_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
|
2017-06-08 15:22:46 -04:00
|
|
|
{[base]install_packages}
|
|
|
|
|
mypy --py2 --ignore-missing-imports {[base]source_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-06-08 15:22:46 -04:00
|
|
|
{[base]pip_install} acme . certbot-apache certbot-compatibility-test
|
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-06-08 15:22:46 -04:00
|
|
|
{[base]pip_install} acme . certbot-apache 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 .
|
2017-06-20 17:02:55 -04:00
|
|
|
docker run --rm -it nginx-compat -c nginx.tar.gz -vv -aie
|
2016-08-10 19:33:56 -04:00
|
|
|
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_*
|
2017-05-25 19:27:31 -04:00
|
|
|
|
|
|
|
|
[testenv:docker_dev]
|
|
|
|
|
# tests the Dockerfile-dev file to ensure development with it works
|
|
|
|
|
# as expected
|
|
|
|
|
commands =
|
|
|
|
|
docker-compose run --rm --service-ports development bash -c 'tox -e lint'
|
|
|
|
|
whitelist_externals =
|
|
|
|
|
docker
|
|
|
|
|
passenv = DOCKER_*
|