Fix tox4 issues
New tox version 4 has changed interpretation of tox.ini The passenv parsing requires the list to be comma-separated. Since the names are case-insensitive, duplicates are removed. skipsdist is now a synonym of no_package and avoids the installation of the package in all cases. However, some environments require it (for setup metadata). Fix allowlist_externals where appropriate. Change-Id: Icb067e85e4f4874a52710d7053a2048e337305c8
This commit is contained in:
parent
7ec3edda1a
commit
324fe6e69b
26
tox.ini
26
tox.ini
|
@ -1,7 +1,6 @@
|
|||
[tox]
|
||||
minversion = 3.1.1
|
||||
envlist = pep8,py3
|
||||
skipsdist = True
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
[testenv]
|
||||
|
@ -16,7 +15,7 @@ deps =
|
|||
-r{toxinidir}/test-requirements.txt
|
||||
commands =
|
||||
stestr run {posargs}
|
||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG GENERATE_HASHES
|
||||
passenv = HTTP_PROXY, HTTPS_PROXY, NO_PROXY, OS_DEBUG, GENERATE_HASHES
|
||||
|
||||
[testenv:functional]
|
||||
commands =
|
||||
|
@ -30,6 +29,7 @@ commands = oslo-config-generator --config-file=etc/masakari/masakari-config-gene
|
|||
commands = oslopolicy-sample-generator --config-file=etc/masakari/masakari-policy-generator.conf
|
||||
|
||||
[testenv:linters]
|
||||
skip_install = True
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
@ -41,10 +41,12 @@ commands =
|
|||
{[testenv:bashate]commands}
|
||||
|
||||
[testenv:pep8]
|
||||
skip_install = True
|
||||
deps = {[testenv:linters]deps}
|
||||
commands = flake8 {posargs}
|
||||
|
||||
[testenv:doc8]
|
||||
skip_install = True
|
||||
deps = {[testenv:linters]deps}
|
||||
commands =
|
||||
doc8 README.rst CONTRIBUTING.rst HACKING.rst doc/source
|
||||
|
@ -53,6 +55,7 @@ commands =
|
|||
doc8 -e '.rst' -e '.inc' api-ref/source
|
||||
|
||||
[testenv:yamllint]
|
||||
skip_install = True
|
||||
deps = {[testenv:linters]deps}
|
||||
commands = yamllint -s .
|
||||
|
||||
|
@ -89,26 +92,31 @@ commands =
|
|||
|
||||
[testenv:pdf-docs]
|
||||
deps = {[testenv:docs]deps}
|
||||
whitelist_externals =
|
||||
allowlist_externals =
|
||||
make
|
||||
commands =
|
||||
sphinx-build -W -b latex doc/source doc/build/pdf
|
||||
make -C doc/build/pdf
|
||||
|
||||
[testenv:releasenotes]
|
||||
deps = {[testenv:docs]deps}
|
||||
skip_install = True
|
||||
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
allowlist_externals =
|
||||
rm
|
||||
commands =
|
||||
rm -fr releasenotes/build
|
||||
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[testenv:debug]
|
||||
basepython = python3
|
||||
commands = oslo_debug_helper {posargs}
|
||||
|
||||
[testenv:api-ref]
|
||||
# This environment is called from CI scripts to test and publish
|
||||
# the API Ref to docs.openstack.org.
|
||||
deps = {[testenv:docs]deps}
|
||||
allowlist_externals =
|
||||
rm
|
||||
commands =
|
||||
rm -rf api-ref/build
|
||||
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
||||
|
@ -163,15 +171,9 @@ extension =
|
|||
paths = ./masakari/hacking
|
||||
|
||||
[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).
|
||||
skip_install = True
|
||||
deps = bindep
|
||||
commands = bindep test
|
||||
usedevelop = False
|
||||
|
||||
[doc8]
|
||||
# NOTE(yoctozepto): this is due to multiple violations - it is better to keep
|
||||
|
|
Loading…
Reference in New Issue