2014-10-03 09:26:36 +00:00
|
|
|
[tox]
|
2020-02-29 15:04:25 -06:00
|
|
|
minversion = 3.1
|
2015-03-28 10:08:33 -07:00
|
|
|
skipsdist = True
|
2020-09-17 19:34:03 +08:00
|
|
|
envlist = pep8,py38
|
2020-02-29 15:04:25 -06:00
|
|
|
ignore_basepython_conflict = True
|
2014-10-03 09:26:36 +00:00
|
|
|
|
|
|
|
[testenv]
|
2019-10-24 13:47:48 +02:00
|
|
|
basepython = python3
|
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
|
2019-06-12 09:52:31 +08:00
|
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-04-04 17:20:57 +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-12 11:31:56 +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 18:21:28 +07:00
|
|
|
stestr run {posargs}
|
|
|
|
stestr slowest
|
2014-10-03 09:26:36 +00:00
|
|
|
|
2016-09-20 17:48:05 +05:30
|
|
|
[testenv:debug]
|
2017-03-10 21:55:47 +05:30
|
|
|
commands = oslo_debug_helper -t kolla/tests {posargs}
|
2016-09-20 17:48:05 +05:30
|
|
|
|
2016-12-15 18:47:24 +05:30
|
|
|
[testenv:cover]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
NOSE_WITH_COVERAGE=1
|
|
|
|
NOSE_COVER_BRANCHES=1
|
|
|
|
NOSE_COVER_HTML=1
|
|
|
|
NOSE_COVER_HTML_DIR={toxinidir}/cover
|
2018-07-10 18:21:28 +07:00
|
|
|
PYTHON=coverage run --source kolla --parallel-mode
|
|
|
|
commands =
|
|
|
|
stestr run {posargs}
|
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
coverage report --show-missing
|
2016-12-15 18:47:24 +05:30
|
|
|
|
2016-02-10 21:39:04 +01:00
|
|
|
[testenv:pep8]
|
2018-02-25 12:12:45 +01:00
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
yamllint
|
2016-01-13 16:44:11 +00:00
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/run-bashate.sh
|
|
|
|
flake8 {posargs}
|
2016-05-17 15:39:25 +05:30
|
|
|
{toxinidir}/tools/validate-all-dockerfiles.sh
|
2016-10-20 02:21:35 +08:00
|
|
|
python {toxinidir}/tools/validate-all-file.py
|
2019-04-24 21:11:35 +02:00
|
|
|
bandit -r docker kolla tests tools
|
2018-06-24 16:17:55 +08:00
|
|
|
yamllint -s .
|
2016-01-13 16:44:11 +00:00
|
|
|
|
2016-03-08 11:50:37 -05:00
|
|
|
[testenv:bandit]
|
2019-04-24 21:11:35 +02:00
|
|
|
commands = bandit -r docker kolla tests tools
|
2016-03-08 11:50:37 -05:00
|
|
|
|
2015-09-03 00:15:54 +00:00
|
|
|
[testenv:venv]
|
2018-12-13 13:58:12 +00:00
|
|
|
deps =
|
2019-06-12 09:52:31 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-12-13 13:58:12 +00: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-04-04 17:20:57 +09:00
|
|
|
deps =
|
2019-06-12 09:52:31 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-04-04 17:20:57 +09:00
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
|
2016-08-04 15:09:10 +02:00
|
|
|
commands =
|
2017-07-13 16:25:51 +01:00
|
|
|
rm -rf doc/build
|
2016-08-04 15:09:10 +02:00
|
|
|
doc8 doc
|
2019-10-14 18:22:46 +08:00
|
|
|
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
2015-08-28 01:38:42 +00:00
|
|
|
|
2019-09-17 11:50:41 +01:00
|
|
|
[testenv:pdf-docs]
|
|
|
|
whitelist_externals = make
|
|
|
|
deps = {[testenv:docs]deps}
|
|
|
|
commands =
|
2019-10-14 18:22:46 +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
|
|
|
|
|
2015-12-30 18:49:56 +08:00
|
|
|
[testenv:genconfig]
|
|
|
|
whitelist_externals = which
|
|
|
|
commands=
|
|
|
|
oslo-config-generator --config-file etc/oslo-config-generator/kolla-build.conf
|
|
|
|
|
2016-03-22 17:11:28 -07:00
|
|
|
[testenv:releasenotes]
|
2020-09-10 09:00:34 +08:00
|
|
|
deps = {[testenv:docs]deps}
|
2016-03-22 17:11:28 -07:00
|
|
|
commands =
|
|
|
|
rm -rf releasenotes/build
|
2019-10-14 18:22:46 +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
|
|
|
|
2016-11-12 22:30:10 +08:00
|
|
|
[testenv:bindep]
|
|
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
|
|
# separately, outside of the requirements files.
|
|
|
|
deps = bindep
|
|
|
|
commands = bindep test
|
|
|
|
|
2015-07-10 14:13:47 -07:00
|
|
|
[flake8]
|
|
|
|
show-source = True
|
2017-06-21 15:32:29 +08:00
|
|
|
enable-extensions = H203,H106
|
2015-12-21 17:04:09 +00:00
|
|
|
exclude=.eggs,.git,.tox,doc
|
2016-01-19 10:53:32 +08:00
|
|
|
|
2020-04-01 19:47:23 +02:00
|
|
|
[flake8:local-plugins]
|
|
|
|
extension =
|
|
|
|
D703 = checks:check_explicit_underscore_import
|
|
|
|
K301 = checks:no_mutable_default_args
|
|
|
|
K302 = checks:no_log_warn
|
|
|
|
paths = ./kolla/hacking
|
2018-03-22 14:21:55 -04:00
|
|
|
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|