11f921444c
Python 3.6 is installed by default in Ubuntu 18.04 LTS. Therefore, according to Transition Plan [1], it'll be handy to have py36 testenv. For more details, please check Python2 Deprecation Timeline [2] and Python3-first Goal - Completion Criteria [3]. [1] https://wiki.ubuntu.com/Python/Python36Transition [2] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html [3] https://review.openstack.org/#/c/575933/ Change-Id: Ic34952687f54176fccf051ab2e28260e25e107a8
113 lines
3.1 KiB
INI
113 lines
3.1 KiB
INI
[tox]
|
|
envlist = py36,py35,py27,pep8,docs
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = {env:TACKER_TOX_PYTHON:python2}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
|
passenv = UPPER_CONSTRAINTS_FILE
|
|
usedevelop = True
|
|
whitelist_externals = rm
|
|
install_command =
|
|
pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
stestr run --slowest {posargs}
|
|
|
|
[testenv:functional]
|
|
setenv = {[testenv]setenv}
|
|
commands =
|
|
stestr --test-path=./tacker/tests/functional run --slowest {posargs}
|
|
|
|
[testenv:dsvm-functional]
|
|
basepython = python2.7
|
|
setenv = {[testenv]setenv}
|
|
|
|
commands =
|
|
stestr --test-path=./tacker/tests/functional run --slowest --concurrency 2 {posargs}
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:debug-py27]
|
|
basepython = python2.7
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:debug-py35]
|
|
basepython = python3.5
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:debug-py36]
|
|
basepython = python3.6
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:pep8]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
basepython = python2.7
|
|
commands =
|
|
flake8
|
|
doc8 -e .rst doc/source/ CONTRIBUTING.rst HACKING.rst README.rst TESTING.rst
|
|
tacker-db-manage check_migration
|
|
bash -c "find tacker -type f -regex '.*\.pot?' -print0|xargs -0 --no-run-if-empty -n 1 msgfmt --check-format -o /dev/null"
|
|
whitelist_externals = bash
|
|
|
|
[testenv:i18n]
|
|
commands = python ./tools/check_i18n.py ./tacker ./tools/i18n_cfg.py
|
|
|
|
[testenv:docs]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:api-ref]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
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
|
|
|
|
[testenv:releasenotes]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
PYTHON=coverage run --source tacker --parallel-mode
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
# E128 continuation line under-indented for visual indent
|
|
# N320 log messages does not translate
|
|
ignore = E128,N320
|
|
show-source = true
|
|
builtins = _
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject
|
|
|
|
[hacking]
|
|
import_exceptions = tacker._i18n
|
|
local-check-factory = tacker.hacking.checks.factory
|
|
|
|
[testenv:config-gen]
|
|
commands =
|
|
oslo-config-generator --config-file=etc/config-generator.conf
|
|
|
|
[testenv:lower-constraints]
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|