2014-07-01 17:11:09 +09:00
|
|
|
[tox]
|
2017-02-08 11:16:37 +07:00
|
|
|
envlist = py35,py27,pep8,docs
|
2014-07-01 17:11:09 +09:00
|
|
|
minversion = 1.6
|
|
|
|
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}
|
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 =
|
2017-07-07 13:47:30 +07:00
|
|
|
rm -f .testrepository/times.dbm
|
2016-06-02 17:39:51 +08:00
|
|
|
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
|
2014-07-01 17:11:09 +09:00
|
|
|
|
|
|
|
[testenv:functional]
|
2014-06-26 17:50:34 +09:00
|
|
|
setenv = OS_TEST_PATH=./tacker/tests/functional
|
2015-09-09 01:05:36 +00:00
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
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}
|
2016-03-21 14:54:58 +08:00
|
|
|
{[testenv:functional]setenv}
|
|
|
|
deps =
|
|
|
|
{[testenv:functional]deps}
|
|
|
|
commands =
|
2016-04-21 09:00:36 +00:00
|
|
|
{toxinidir}/tools/ostestr_compat_shim.sh --concurrency 2 {posargs}
|
2016-03-21 14:54:58 +08:00
|
|
|
|
2014-07-01 17:11:09 +09:00
|
|
|
[tox:jenkins]
|
|
|
|
sitepackages = True
|
|
|
|
|
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}
|
|
|
|
|
2014-07-01 17:11:09 +09:00
|
|
|
[testenv:pep8]
|
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]
|
2017-01-06 22:34:32 +00:00
|
|
|
basepython = python2.7
|
2015-10-15 02:47:33 +00:00
|
|
|
commands =
|
|
|
|
doc8 -e .rst doc/source/ CONTRIBUTING.rst HACKING.rst README.rst TESTING.rst
|
|
|
|
python setup.py build_sphinx
|
|
|
|
|
2016-06-21 16:53:06 +02:00
|
|
|
[testenv:api-ref]
|
|
|
|
# This environment is called from CI scripts to test and publish
|
|
|
|
# the API Ref to developer.openstack.org.
|
|
|
|
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]
|
|
|
|
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]
|
2016-04-20 17:36:35 +00:00
|
|
|
# Also do not run test_coverage_ext tests while gathering coverage as those
|
|
|
|
# tests conflict with coverage.
|
2014-07-01 17:11:09 +09:00
|
|
|
commands =
|
2016-04-20 17:36:35 +00:00
|
|
|
coverage erase
|
|
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
2016-12-19 11:01:29 +05:30
|
|
|
coverage report
|
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
|