diskimage-create: Fix tox.ini not compatible with tox 4.x

Change-Id: I24e1a7059c7ed1bdfe0f287c81148db912ce52a9
This commit is contained in:
Takashi Kajinami 2023-10-27 12:19:17 +09:00
parent 05616ab7cc
commit 753c30f1e0
1 changed files with 30 additions and 13 deletions

View File

@ -1,36 +1,53 @@
[tox] [tox]
minversion = 1.8 minversion = 3.18
envlist = bashate,docs,build,test envlist = bashate,docs,build,test
skipsdist = True
[testenv] [testenv]
basepython = python3 basepython = python3
envdir = {toxworkdir}/venv envdir = {toxworkdir}/venv
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY DIB_* CLOUD_INIT_DATASOURCES OCTAVIA_REPO_PATH passenv =
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
DIB_*
CLOUD_INIT_DATASOURCES
OCTAVIA_REPO_PATH
install_command = pip install -U {opts} {packages} install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
whitelist_externals = virt-filesystems allowlist_externals =
virt-inspector virt-filesystems
awk virt-inspector
mkdir awk
rm mkdir
rm
[testenv:docs] [testenv:docs]
commands = doc8 README.rst ../elements/haproxy-octavia/README.rst ../elements/root-passwd/README.rst commands = doc8 README.rst ../elements/haproxy-octavia/README.rst ../elements/root-passwd/README.rst
[testenv:bashate] [testenv:bashate]
commands = bashate diskimage-create.sh commands =
bashate image-tests.sh bashate diskimage-create.sh
bashate image-tests.sh
[testenv:build] [testenv:build]
# NOTE: specify cache directory explicitly with -c as the `diskimage-create.sh` # NOTE: specify cache directory explicitly with -c as the `diskimage-create.sh`
# default is based off of `$HOME` which is not passed on in a `tox` environment. # default is based off of `$HOME` which is not passed on in a `tox` environment.
commands = ./diskimage-create.sh -o {toxinidir}/amphora-x64-haproxy -w {toxworkdir} -c {toxworkdir}/.cache commands =
./diskimage-create.sh -o {toxinidir}/amphora-x64-haproxy -w {toxworkdir} -c {toxworkdir}/.cache
allowlist_externals =
./diskimage-create.sh
[testenv:test] [testenv:test]
# Work around tox limitations with command pipes # Work around tox limitations with command pipes
# https://bitbucket.org/hpk42/tox/issue/73/pipe-output-of-command-into-file # https://bitbucket.org/hpk42/tox/issue/73/pipe-output-of-command-into-file
commands = ./image-tests.sh {toxinidir}/.amp_tox_test commands =
rm -rf {toxinidir}/.amp_tox_test ./image-tests.sh {toxinidir}/.amp_tox_test
rm -rf {toxinidir}/.amp_tox_test
allowlist_externals =
./image-tests.sh