Update tox.ini to work with tox 4
This change will allow this repo to pass zuul now that this has merged: https://review.opendev.org/c/zuul/zuul-jobs/+/866943 Tox 4 deprecated whitelist_externals. Replace whitelist_externals with allowlist_externals skipsdist and usedevelop are incompatible in tox 4. Setting tox < 4 in .zuul.yaml rather than trying to figure out why the sysinv component is not properly installing in tox. Partial-Bug: #1997255 Signed-off-by: Al Bailey <al.bailey@windriver.com> Change-Id: If8e339d20e57e0830ea4ce27c098bacfef2f2ef8
This commit is contained in:
parent
0cf17cac5c
commit
94034b91f9
@ -1,5 +1,7 @@
|
|||||||
---
|
---
|
||||||
- project:
|
- project:
|
||||||
|
vars:
|
||||||
|
ensure_tox_version: '<4'
|
||||||
templates:
|
templates:
|
||||||
- publish-stx-docs
|
- publish-stx-docs
|
||||||
- stx-api-ref-jobs
|
- stx-api-ref-jobs
|
||||||
|
@ -10,7 +10,7 @@ toxworkdir = /tmp/{env:USER}_cctox
|
|||||||
stxdir = {toxinidir}/../../..
|
stxdir = {toxinidir}/../../..
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
whitelist_externals = find
|
allowlist_externals = find
|
||||||
install_command = pip install \
|
install_command = pip install \
|
||||||
--no-cache-dir \
|
--no-cache-dir \
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
|
||||||
|
@ -26,11 +26,17 @@ deps = -r{toxinidir}/requirements.txt
|
|||||||
commands =
|
commands =
|
||||||
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
||||||
|
|
||||||
whitelist_externals =
|
allowlist_externals =
|
||||||
bash
|
bash
|
||||||
find
|
find
|
||||||
rm
|
rm
|
||||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
passenv =
|
||||||
|
http_proxy
|
||||||
|
HTTP_PROXY
|
||||||
|
https_proxy
|
||||||
|
HTTPS_PROXY
|
||||||
|
no_proxy
|
||||||
|
NO_PROXY
|
||||||
|
|
||||||
[testenv:py27]
|
[testenv:py27]
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
|
@ -4,17 +4,17 @@ minversion = 1.6
|
|||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
# tox does not work if the path to the workdir is too long, so move it to /tmp
|
# tox does not work if the path to the workdir is too long, so move it to /tmp
|
||||||
# tox 3.1.0 adds TOX_LIMITED_SHEBANG
|
# tox 3.1.0 adds TOX_LIMITED_SHEBANG
|
||||||
toxworkdir = /tmp/{env:USER}_sysinvtox
|
toxworkdir = /tmp/{env:USER}_sysinvtox
|
||||||
stxdir = {toxinidir}/../../../..
|
stxdir = {toxinidir}/../../../..
|
||||||
distshare={toxworkdir}/.tox/distshare
|
distshare={toxworkdir}/.tox/distshare
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
usedevelop = True
|
||||||
|
|
||||||
# tox is silly... these need to be separated by a newline....
|
# tox is silly... these need to be separated by a newline....
|
||||||
whitelist_externals = bash
|
allowlist_externals = bash
|
||||||
find
|
find
|
||||||
|
|
||||||
install_command = pip install -v -v -v \
|
install_command = pip install -v -v -v \
|
||||||
@ -119,6 +119,7 @@ commands =
|
|||||||
|
|
||||||
[testenv:py39]
|
[testenv:py39]
|
||||||
basepython = python3.9
|
basepython = python3.9
|
||||||
|
|
||||||
install_command = pip install -v -v -v \
|
install_command = pip install -v -v -v \
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
||||||
{opts} {packages}
|
{opts} {packages}
|
||||||
|
16
tox.ini
16
tox.ini
@ -12,12 +12,12 @@ setenv = VIRTUAL_ENV={envdir}
|
|||||||
OS_STDERR_CAPTURE=1
|
OS_STDERR_CAPTURE=1
|
||||||
OS_TEST_TIMEOUT=60
|
OS_TEST_TIMEOUT=60
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
whitelist_externals = reno
|
allowlist_externals = reno
|
||||||
|
|
||||||
|
|
||||||
[testenv:bashate]
|
[testenv:bashate]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
whitelist_externals = bash
|
allowlist_externals = bash
|
||||||
# The following are suppressed:
|
# The following are suppressed:
|
||||||
# E006 Line too long
|
# E006 Line too long
|
||||||
# E010 The "do" should be on same line as for
|
# E010 The "do" should be on same line as for
|
||||||
@ -52,7 +52,7 @@ commands =
|
|||||||
|
|
||||||
[testenv:yamllint]
|
[testenv:yamllint]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
whitelist_externals = bash
|
allowlist_externals = bash
|
||||||
commands =
|
commands =
|
||||||
bash -c "find {toxinidir} \
|
bash -c "find {toxinidir} \
|
||||||
-name .tox -prune \
|
-name .tox -prune \
|
||||||
@ -62,7 +62,7 @@ commands =
|
|||||||
|
|
||||||
[testenv:shellcheck]
|
[testenv:shellcheck]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
whitelist_externals = bash
|
allowlist_externals = bash
|
||||||
# The following shellcheck errors are suppressed:
|
# The following shellcheck errors are suppressed:
|
||||||
# SC1091: Not following: ./bin/activate was not specified as input (see shellcheck -x).
|
# SC1091: Not following: ./bin/activate was not specified as input (see shellcheck -x).
|
||||||
# SC2001: See if you can use ${variable//search/replace} instead.
|
# SC2001: See if you can use ${variable//search/replace} instead.
|
||||||
@ -139,7 +139,7 @@ commands =
|
|||||||
|
|
||||||
[testenv:linters]
|
[testenv:linters]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
whitelist_externals = bash
|
allowlist_externals = bash
|
||||||
commands =
|
commands =
|
||||||
{[testenv:bashate]commands}
|
{[testenv:bashate]commands}
|
||||||
{[testenv:yamllint]commands}
|
{[testenv:yamllint]commands}
|
||||||
@ -176,7 +176,7 @@ deps = -r{toxinidir}/doc/requirements.txt
|
|||||||
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
|
||||||
whitelist_externals = rm
|
allowlist_externals = rm
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
@ -185,7 +185,7 @@ deps = -r{toxinidir}/doc/requirements.txt
|
|||||||
commands =
|
commands =
|
||||||
rm -rf doc/build
|
rm -rf doc/build
|
||||||
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
||||||
whitelist_externals = rm
|
allowlist_externals = rm
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
@ -194,7 +194,7 @@ deps = -r{toxinidir}/doc/requirements.txt
|
|||||||
commands =
|
commands =
|
||||||
rm -rf releasenotes/build
|
rm -rf releasenotes/build
|
||||||
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
whitelist_externals = rm
|
allowlist_externals = rm
|
||||||
|
|
||||||
[testenv:newnote]
|
[testenv:newnote]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
@ -22,7 +22,7 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/
|
|||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
|
||||||
whitelist_externals = find
|
allowlist_externals = find
|
||||||
sh
|
sh
|
||||||
|
|
||||||
[testenv:stestr]
|
[testenv:stestr]
|
||||||
|
Loading…
Reference in New Issue
Block a user