2014-07-01 17:11:09 +09:00
|
|
|
[tox]
|
2020-06-29 04:40:00 +00:00
|
|
|
envlist = py38,py36,pep8,docs
|
2019-10-31 06:25:49 +00:00
|
|
|
minversion = 3.1.1
|
2014-07-01 17:11:09 +09:00
|
|
|
skipsdist = True
|
2019-10-31 06:25:49 +00:00
|
|
|
ignore_basepython_conflict = True
|
2014-07-01 17:11:09 +09:00
|
|
|
|
|
|
|
[testenv]
|
2019-10-31 06:25:49 +00:00
|
|
|
basepython = python3
|
2014-07-01 17:11:09 +09:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2018-06-07 17:05:17 +09:00
|
|
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
|
|
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
|
|
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
2017-10-28 16:20:51 +08:00
|
|
|
passenv = UPPER_CONSTRAINTS_FILE
|
2014-07-01 17:11:09 +09:00
|
|
|
usedevelop = True
|
2017-07-07 13:47:30 +07:00
|
|
|
whitelist_externals = rm
|
2016-08-01 20:39:42 +00:00
|
|
|
install_command =
|
2019-12-06 11:58:01 +09:00
|
|
|
pip install -U {opts} {packages}
|
|
|
|
deps =
|
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2014-07-01 17:11:09 +09:00
|
|
|
commands =
|
2019-01-16 17:35:35 +09:00
|
|
|
stestr run --slowest --concurrency 1 {posargs}
|
2014-07-01 17:11:09 +09:00
|
|
|
|
|
|
|
[testenv:functional]
|
2018-07-03 13:28:14 +05:30
|
|
|
setenv = {[testenv]setenv}
|
|
|
|
commands =
|
|
|
|
stestr --test-path=./tacker/tests/functional run --slowest {posargs}
|
2014-07-01 17:11:09 +09:00
|
|
|
|
2016-03-21 14:54:58 +08:00
|
|
|
[testenv:dsvm-functional]
|
2016-06-02 17:39:51 +08:00
|
|
|
setenv = {[testenv]setenv}
|
2018-07-03 13:28:14 +05:30
|
|
|
|
2016-03-21 14:54:58 +08:00
|
|
|
commands =
|
2018-07-03 13:28:14 +05:30
|
|
|
stestr --test-path=./tacker/tests/functional run --slowest --concurrency 2 {posargs}
|
2016-03-21 14:54:58 +08:00
|
|
|
|
2016-04-18 10:52:10 +08:00
|
|
|
[testenv:debug]
|
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
2018-07-05 12:40:32 +09:00
|
|
|
[testenv:debug-py36]
|
|
|
|
basepython = python3.6
|
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
2014-07-01 17:11:09 +09:00
|
|
|
[testenv:pep8]
|
2018-03-12 23:59:57 +09:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2014-07-01 17:11:09 +09:00
|
|
|
commands =
|
|
|
|
flake8
|
2017-01-06 22:34:32 +00:00
|
|
|
doc8 -e .rst doc/source/ CONTRIBUTING.rst HACKING.rst README.rst TESTING.rst
|
2014-06-26 17:50:34 +09:00
|
|
|
tacker-db-manage check_migration
|
2014-07-01 17:11:09 +09:00
|
|
|
whitelist_externals = bash
|
|
|
|
|
|
|
|
[testenv:i18n]
|
2019-07-12 09:00:15 +00:00
|
|
|
commands = python ./tools/check_i18n.py ./tacker
|
2014-07-01 17:11:09 +09:00
|
|
|
|
2015-10-15 02:47:33 +00:00
|
|
|
[testenv:docs]
|
2018-03-12 23:59:57 +09:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2015-10-15 02:47:33 +00:00
|
|
|
commands =
|
2018-03-20 04:36:20 +09:00
|
|
|
sphinx-build -W -b html doc/source doc/build/html
|
2019-08-08 08:59:06 +00:00
|
|
|
oslopolicy-sample-generator --config-file=etc/tacker-policy-generator.conf
|
2015-10-15 02:47:33 +00:00
|
|
|
|
2016-06-21 16:53:06 +02:00
|
|
|
[testenv:api-ref]
|
2018-03-12 23:59:57 +09:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2016-06-21 16:53:06 +02:00
|
|
|
commands =
|
|
|
|
rm -rf api-ref/build
|
|
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
whitelist_externals = rm
|
|
|
|
|
2016-05-31 20:14:00 -05:00
|
|
|
[testenv:releasenotes]
|
2018-03-12 23:59:57 +09:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2016-05-31 20:14:00 -05:00
|
|
|
commands =
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
|
2014-07-01 17:11:09 +09:00
|
|
|
[testenv:cover]
|
2018-06-07 17:05:17 +09:00
|
|
|
setenv =
|
|
|
|
PYTHON=coverage run --source tacker --parallel-mode
|
2014-07-01 17:11:09 +09:00
|
|
|
commands =
|
2018-06-07 17:05:17 +09:00
|
|
|
stestr run {posargs}
|
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
2014-07-01 17:11:09 +09:00
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[flake8]
|
|
|
|
# E128 continuation line under-indented for visual indent
|
2017-03-21 13:24:40 +08:00
|
|
|
# N320 log messages does not translate
|
2020-04-01 20:15:00 +02:00
|
|
|
# W503 line break before binary operator
|
|
|
|
# W504 line break after binary operator
|
|
|
|
ignore = E128,N320,W503,W504
|
2014-07-01 17:11:09 +09:00
|
|
|
show-source = true
|
|
|
|
builtins = _
|
2016-08-05 10:22:20 +08:00
|
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject
|
2014-07-01 17:11:09 +09:00
|
|
|
|
|
|
|
[hacking]
|
2016-07-06 15:56:10 +08:00
|
|
|
import_exceptions = tacker._i18n
|
2020-04-01 20:15:00 +02:00
|
|
|
|
|
|
|
[flake8:local-plugins]
|
|
|
|
extension =
|
|
|
|
N320 = checks:validate_log_translations
|
|
|
|
paths = ./tacker/hacking
|
2016-07-08 06:21:58 +05:30
|
|
|
|
|
|
|
[testenv:config-gen]
|
|
|
|
commands =
|
|
|
|
oslo-config-generator --config-file=etc/config-generator.conf
|
2018-03-22 18:56:07 -04:00
|
|
|
|
2019-08-08 08:59:06 +00:00
|
|
|
[testenv:genpolicy]
|
|
|
|
commands =
|
|
|
|
oslopolicy-sample-generator --config-file=etc/tacker-policy-generator.conf
|
|
|
|
|
2018-03-22 18:56:07 -04:00
|
|
|
[testenv:lower-constraints]
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|
2019-06-28 07:20:26 +00: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, and develop mode disabled
|
|
|
|
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
|
|
|
# further relies on "tox.skipsdist = True" above).
|
|
|
|
deps = bindep
|
|
|
|
commands = bindep test
|