python-manilaclient/tox.ini
wu.shiming 5220acf12e Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I1d52cacc72f33b37c606512a14ff9f94c561a53f
2021-05-31 15:34:29 +08:00

105 lines
2.5 KiB
INI

[tox]
distribute = False
envlist = py3,pep8
minversion = 3.18.0
skipsdist = True
[testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
allowlist_externals = find
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
stestr run {posargs}
stestr slowest
[testenv:debug]
commands = oslo_debug_helper -t manilaclient/tests {posargs}
[testenv:pep8]
commands =
flake8
[testenv:venv]
commands = {posargs}
[testenv:docs]
usedevelop = True
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
allowlist_externals = rm
commands =
rm -rf doc/build
sphinx-build -b html doc/source doc/build/html
[testenv:pdf-docs]
usedevelop = True
deps = {[testenv:docs]deps}
allowlist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:releasenotes]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
allowlist_externals = rm
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees \
-b html releasenotes/source releasenotes/build/html
[testenv:functional]
setenv =
{[testenv]setenv}
OS_TEST_PATH = ./manilaclient/tests/functional
OS_SHARE_API_VERSION = 2
passenv = OS_*
commands =
{envdir}/bin/python setup.py install
stestr run {posargs}
[testenv:genconfig]
allowlist_externals = bash
commands =
{envdir}/bin/python setup.py install
{envdir}/bin/oslo-config-generator --config-file etc/oslo-config-generator/manilaclient.conf
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source manilaclient --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[flake8]
# F821: undefined name
# W503 line break before binary operator
# W504 line break after binary operator
ignore = F821,W503,W504
builtins = _
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H904] Delay string interpolations at logging calls.
enable-extensions = H106,H203,H904
exclude = .venv,.tox,dist,doc,*egg,build
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt