From de83f11f69f095e633c896daa9f45a0762695f2d Mon Sep 17 00:00:00 2001 From: "Dr. Jens Harbott" Date: Wed, 4 Jan 2023 19:10:34 +0100 Subject: [PATCH] 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 --- tox.ini | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tox.ini b/tox.ini index 477c7c0455..6a8bdcde6e 100644 --- a/tox.ini +++ b/tox.ini @@ -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 =