Pin tox to be less than 4

The dev environment used by some docs developers uses
an old version of tox, and does not support the
whitelist_externals entry required by tox 4.

The version of tox used by some other developers cannot
support tox.ini that contains both allowlist_externals and
whitelist_externals in the same file.

The fix for now is to stay with whitelist_externals and tox<4

Signed-off-by: Ron Stone <ronald.stone@windriver.com>
Change-Id: Ib398b6b552d8dfd4d53a6581a3d91f3a3800a30c
This commit is contained in:
Ron Stone 2023-01-13 10:29:50 -05:00
parent fefa4270c8
commit 8c932e4c21
2 changed files with 7 additions and 11 deletions

View File

@ -1,5 +1,7 @@
--- ---
- project: - project:
vars:
ensure_tox_version: '<4'
templates: templates:
- stx-api-ref-jobs - stx-api-ref-jobs
check: check:

16
tox.ini
View File

@ -18,21 +18,18 @@ deps =
commands = commands =
sphinx-build -a -E -W --keep-going -d doc/build/doctrees -t starlingx -t openstack -b html doc/source doc/build/html {posargs} sphinx-build -a -E -W --keep-going -d doc/build/doctrees -t starlingx -t openstack -b html doc/source doc/build/html {posargs}
bash htmlChecks.sh bash htmlChecks.sh
allowlist_externals = bash whitelist_externals = bash
htmlChecks.sh htmlChecks.sh
whitelist_externals = {[testenv:docs]allowlist_externals}
[testenv:api-ref] [testenv:api-ref]
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
commands = commands =
rm -rf api-ref/build rm -rf api-ref/build
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
allowlist_externals = rm whitelist_externals = rm
whitelist_externals = {[testenv:api-ref]allowlist_externals}
[testenv:linters] [testenv:linters]
allowlist_externals = bash whitelist_externals = bash
whitelist_externals = {[testenv:linters]allowlist_externals}
commands = commands =
bash -c "find {toxinidir} \ bash -c "find {toxinidir} \
\( -name .tox -prune \) \ \( -name .tox -prune \) \
@ -50,16 +47,14 @@ passenv=PWD
commands = commands =
bash -c "echo Running in {env:PWD}" bash -c "echo Running in {env:PWD}"
bash new-topic.sh {env:PWD} {toxinidir} bash new-topic.sh {env:PWD} {toxinidir}
allowlist_externals = new-topic.sh whitelist_externals = new-topic.sh
bash bash
whitelist_externals = {[testenv:newfile]allowlist_externals}
[testenv:picks] [testenv:picks]
commands = commands =
./pickCompare.sh ./pickCompare.sh
allowlist_externals = pickCompare.sh whitelist_externals = pickCompare.sh
bash bash
whitelist_externals = {[testenv:picks]allowlist_externals}
[testenv:linkcheck] [testenv:linkcheck]
@ -75,4 +70,3 @@ deps =
sphinxcontrib-spelling==7.3.2 sphinxcontrib-spelling==7.3.2
commands = commands =
sphinx-build -a -E --keep-going -d doc/build/doctrees -t starlingx -t openstack -t use_spellext -b spelling doc/source doc/build/spelling {posargs} sphinx-build -a -E --keep-going -d doc/build/doctrees -t starlingx -t openstack -t use_spellext -b spelling doc/source doc/build/spelling {posargs}