2014-07-01 17:11:09 +09:00
|
|
|
[tox]
|
2018-07-05 12:40:32 +09:00
|
|
|
envlist = py36,py35,py27,pep8,docs
|
2018-11-02 11:19:51 +07:00
|
|
|
minversion = 2.0
|
2014-07-01 17:11:09 +09:00
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
[testenv]
|
2017-10-28 16:20:51 +08:00
|
|
|
basepython = {env:TACKER_TOX_PYTHON:python2}
|
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 =
|
|
|
|
pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
2014-07-01 17:11:09 +09:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
commands =
|
2018-06-07 17:05:17 +09:00
|
|
|
stestr run --slowest {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]
|
|
|
|
basepython = python2.7
|
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}
|
|
|
|
|
|
|
|
[testenv:debug-py27]
|
|
|
|
basepython = python2.7
|
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
2017-02-08 11:16:37 +07:00
|
|
|
[testenv:debug-py35]
|
|
|
|
basepython = python3.5
|
2016-04-18 10:52:10 +08:00
|
|
|
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
|
2017-01-06 22:34:32 +00:00
|
|
|
basepython = python2.7
|
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
|
2016-01-31 22:08:04 +01:00
|
|
|
bash -c "find tacker -type f -regex '.*\.pot?' -print0|xargs -0 --no-run-if-empty -n 1 msgfmt --check-format -o /dev/null"
|
2014-07-01 17:11:09 +09:00
|
|
|
whitelist_externals = bash
|
|
|
|
|
|
|
|
[testenv:i18n]
|
2014-06-26 17:50:34 +09:00
|
|
|
commands = python ./tools/check_i18n.py ./tacker ./tools/i18n_cfg.py
|
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
|
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
|
|
|
|
ignore = E128,N320
|
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
|
2014-06-26 17:50:34 +09:00
|
|
|
local-check-factory = tacker.hacking.checks.factory
|
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
|
|
|
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|