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