Fixes for tox4

- Replace long deprecated whitelist_externals with allowlist_externals.
- Drop basepython option that is no longer needed.
- Invoke bash scripts with explicit bash command instead of allowlisting
  every single script.

Change-Id: I2b70ebb3b1ee94ad75e46295d788312c5e183748
This commit is contained in:
Dr. Jens Harbott 2023-01-04 19:10:34 +01:00
parent bf388c77ad
commit de83f11f69

19
tox.ini
View File

@ -4,12 +4,11 @@ envlist = linters,publishdocs
skipsdist = True skipsdist = True
[testenv] [testenv]
basepython=python3
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
passenv = ZUUL_* passenv = ZUUL_*
whitelist_externals = allowlist_externals =
bash bash
cp cp
mkdir mkdir
@ -27,19 +26,19 @@ commands =
commands = commands =
flake8 flake8
doc8 doc doc8 doc
{toxinidir}/tools/glossary-sort.sh bash {toxinidir}/tools/glossary-sort.sh
[testenv:docs] [testenv:docs]
commands = commands =
{toxinidir}/tools/build-all-rst.sh bash {toxinidir}/tools/build-all-rst.sh
[testenv:pdfs] [testenv:pdfs]
commands = commands =
{toxinidir}/tools/build-all-rst.sh --pdf bash {toxinidir}/tools/build-all-rst.sh --pdf
[testenv:build] [testenv:build]
commands = commands =
{toxinidir}/tools/build-rst.sh \ bash {toxinidir}/tools/build-rst.sh \
doc/{posargs} \ doc/{posargs} \
--build build \ --build build \
--target {posargs} --target {posargs}
@ -49,25 +48,25 @@ commands =
# published on docs.openstack.org with just copying publish-docs/* # published on docs.openstack.org with just copying publish-docs/*
# over. # over.
commands = commands =
{toxinidir}/tools/publishdocs.sh bash {toxinidir}/tools/publishdocs.sh
whereto publish-docs/html/.htaccess publish-docs/html/redirect-tests.txt whereto publish-docs/html/.htaccess publish-docs/html/redirect-tests.txt
rm publish-docs/html/redirect-tests.txt rm publish-docs/html/redirect-tests.txt
[testenv:buildlang] [testenv:buildlang]
# Run as "tox -e buildlang -- $LANG" # Run as "tox -e buildlang -- $LANG"
whitelist_externals = doc-tools-check-languages allowlist_externals = doc-tools-check-languages
commands = commands =
doc-tools-check-languages doc-tools-check-languages.conf test {posargs} doc-tools-check-languages doc-tools-check-languages.conf test {posargs}
[testenv:publishlang] [testenv:publishlang]
whitelist_externals = doc-tools-check-languages allowlist_externals = doc-tools-check-languages
commands = commands =
doc-tools-check-languages doc-tools-check-languages.conf publish all doc-tools-check-languages doc-tools-check-languages.conf publish all
[testenv:generatepot-rst] [testenv:generatepot-rst]
# Generate POT files for translation, needs {posargs} like: # Generate POT files for translation, needs {posargs} like:
# tox -e generatepot-rst -- user-guide # tox -e generatepot-rst -- user-guide
commands = {toxinidir}/tools/generatepot-rst.sh openstack-manuals 1 {posargs} commands = bash {toxinidir}/tools/generatepot-rst.sh openstack-manuals 1 {posargs}
[testenv:releasenotes] [testenv:releasenotes]
commands = commands =