2014-10-03 09:26:36 +00:00
|
|
|
[tox]
|
2019-04-22 16:09:19 +05:30
|
|
|
minversion = 2.5.0
|
2015-03-28 10:08:33 -07:00
|
|
|
skipsdist = True
|
2019-07-05 11:38:38 -04:00
|
|
|
envlist = py27,py37,pep8,pypy
|
2014-10-03 09:26:36 +00:00
|
|
|
|
|
|
|
[testenv]
|
2015-12-30 18:49:56 +08:00
|
|
|
usedevelop=True
|
2016-01-08 19:18:56 +08:00
|
|
|
whitelist_externals = find
|
2016-03-22 17:11:28 -07:00
|
|
|
rm
|
2018-04-06 18:28:51 +09:00
|
|
|
install_command = pip install {opts} {packages}
|
2019-07-03 10:37:51 +08:00
|
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-04-06 18:28:51 +09:00
|
|
|
-r{toxinidir}/requirements.txt
|
2015-07-10 14:13:47 -07:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
2015-12-11 09:17:42 +09:00
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
2016-01-14 15:31:41 +08:00
|
|
|
OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE OS_TEST_TIMEOUT
|
|
|
|
PYTHON OS_TEST_PATH LISTOPT IDOPTION
|
2016-01-08 19:18:56 +08:00
|
|
|
commands =
|
2019-02-13 21:30:51 +01:00
|
|
|
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
|
2016-09-20 12:09:30 +05:30
|
|
|
find . -type d -name "__pycache__" -delete
|
2018-07-10 17:44:27 +07:00
|
|
|
stestr run --slowest {posargs}
|
2014-10-03 09:26:36 +00:00
|
|
|
|
2016-09-20 17:48:05 +05:30
|
|
|
[testenv:debug]
|
2018-06-12 15:09:06 +08:00
|
|
|
basepython = python3
|
2017-07-06 13:41:30 +01:00
|
|
|
commands = oslo_debug_helper -t tests {posargs}
|
2016-09-20 17:48:05 +05:30
|
|
|
|
2017-01-12 18:15:04 +05:30
|
|
|
[testenv:cover]
|
2018-06-12 15:09:06 +08:00
|
|
|
basepython = python3
|
2017-01-12 18:15:04 +05:30
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
NOSE_WITH_COVERAGE=1
|
|
|
|
NOSE_COVER_BRANCHES=1
|
|
|
|
NOSE_COVER_HTML=1
|
|
|
|
NOSE_COVER_HTML_DIR={toxinidir}/cover
|
2019-06-04 17:43:45 +01:00
|
|
|
PYTHON=coverage run --source kolla_ansible,ansible/action_plugins,ansible/library,ansible/roles/keystone/files/ --parallel-mode
|
2018-07-10 17:44:27 +07:00
|
|
|
commands =
|
2018-10-09 10:09:29 +07:00
|
|
|
stestr run {posargs}
|
2018-07-10 17:44:27 +07:00
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
2017-01-12 18:15:04 +05:30
|
|
|
|
2016-02-10 21:39:04 +01:00
|
|
|
[testenv:pep8]
|
2018-06-12 15:09:06 +08:00
|
|
|
basepython = python3
|
2018-04-06 18:28:51 +09:00
|
|
|
# sphinx needs to be installed to make doc8 work properly
|
2018-02-25 12:02:00 +01:00
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
2018-04-06 18:28:51 +09:00
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2018-02-25 12:02:00 +01:00
|
|
|
yamllint
|
2016-01-13 16:44:11 +00:00
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/run-bashate.sh
|
|
|
|
flake8 {posargs}
|
2018-10-16 14:05:27 +00:00
|
|
|
doc8 doc/source
|
2016-10-20 02:21:35 +08:00
|
|
|
python {toxinidir}/tools/validate-all-file.py
|
2018-08-17 12:56:22 +02:00
|
|
|
bandit --skip B303 -r ansible kolla_ansible tests tools
|
2018-06-24 16:40:12 +08:00
|
|
|
yamllint -s .
|
2016-01-13 16:44:11 +00:00
|
|
|
|
2016-03-08 11:50:37 -05:00
|
|
|
[testenv:bandit]
|
2018-08-17 12:56:22 +02:00
|
|
|
# B303: Use of insecure MD2, MD4, MD5, or SHA1 hash function.
|
2018-06-12 15:09:06 +08:00
|
|
|
basepython = python3
|
2018-08-17 12:56:22 +02:00
|
|
|
commands = bandit --skip B303 -r ansible kolla_ansible tests tools
|
2016-03-08 11:50:37 -05:00
|
|
|
|
2015-09-03 00:15:54 +00:00
|
|
|
[testenv:venv]
|
2018-06-12 15:09:06 +08:00
|
|
|
basepython = python3
|
2018-04-06 18:28:51 +09:00
|
|
|
deps =
|
2019-07-03 10:37:51 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-04-06 18:28:51 +09:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2015-09-03 00:15:54 +00:00
|
|
|
commands = {posargs}
|
|
|
|
|
2015-08-28 01:38:42 +00:00
|
|
|
[testenv:docs]
|
2018-06-12 15:09:06 +08:00
|
|
|
basepython = python3
|
2018-04-06 18:28:51 +09:00
|
|
|
deps =
|
2019-07-03 10:37:51 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-04-06 18:28:51 +09:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2016-08-04 15:09:10 +02:00
|
|
|
commands =
|
2017-07-13 15:04:19 +01:00
|
|
|
rm -rf doc/build
|
2019-10-14 18:18:48 +08:00
|
|
|
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
2015-08-28 01:38:42 +00:00
|
|
|
|
2017-01-27 16:55:04 +10:00
|
|
|
[testenv:deploy-guide]
|
2018-06-12 15:09:06 +08:00
|
|
|
basepython = python3
|
2018-04-06 18:28:51 +09:00
|
|
|
deps =
|
2019-07-03 10:37:51 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-04-06 18:28:51 +09:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
|
|
|
|
commands =
|
|
|
|
rm -rf deploy-guide/build
|
2019-10-14 18:18:48 +08:00
|
|
|
sphinx-build -a -E -W -d deploy-guide/build/doctrees --keep-going -b html deploy-guide/source deploy-guide/build/html
|
2017-01-27 16:55:04 +10:00
|
|
|
|
2019-09-17 11:50:41 +01:00
|
|
|
[testenv:pdf-docs]
|
|
|
|
basepython = python3
|
|
|
|
whitelist_externals = make
|
|
|
|
deps = {[testenv:docs]deps}
|
|
|
|
commands =
|
2019-10-14 18:18:48 +08:00
|
|
|
sphinx-build -W --keep-going -b latex doc/source doc/build/pdf
|
2019-09-17 11:50:41 +01:00
|
|
|
make -C doc/build/pdf
|
|
|
|
|
2016-03-22 17:11:28 -07:00
|
|
|
[testenv:releasenotes]
|
2018-06-12 15:09:06 +08:00
|
|
|
basepython = python3
|
2018-04-06 18:28:51 +09:00
|
|
|
deps =
|
2019-07-03 10:37:51 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-04-06 18:28:51 +09:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2016-03-22 17:11:28 -07:00
|
|
|
commands =
|
|
|
|
rm -rf releasenotes/build
|
2019-10-14 18:18:48 +08:00
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
2016-03-22 17:11:28 -07:00
|
|
|
|
2015-07-10 14:13:47 -07:00
|
|
|
[flake8]
|
|
|
|
show-source = True
|
2015-12-21 17:04:09 +00:00
|
|
|
exclude=.eggs,.git,.tox,doc
|
2018-03-22 14:22:43 -04:00
|
|
|
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|