Files
octavia/diskimage-create/tox.ini
Takashi Kajinami 9c5ef5eafe tox: Drop envdir
tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~

According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293

Change-Id: Ia842a72d618cf4b27ebaab0f2c576bb7eb76ab24
2024-10-13 01:30:06 +09:00

53 lines
1.3 KiB
INI

[tox]
minversion = 3.18
envlist = bashate,docs,build,test
[testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
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}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
allowlist_externals =
virt-filesystems
virt-inspector
awk
mkdir
rm
[testenv:docs]
commands = doc8 README.rst ../elements/haproxy-octavia/README.rst ../elements/root-passwd/README.rst
[testenv:bashate]
commands =
bashate diskimage-create.sh
bashate image-tests.sh
[testenv:build]
# 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.
commands =
./diskimage-create.sh -o {toxinidir}/amphora-x64-haproxy -w {toxworkdir} -c {toxworkdir}/.cache
allowlist_externals =
./diskimage-create.sh
[testenv:test]
# Work around tox limitations with command pipes
# https://bitbucket.org/hpk42/tox/issue/73/pipe-output-of-command-into-file
commands =
./image-tests.sh {toxinidir}/.amp_tox_test
rm -rf {toxinidir}/.amp_tox_test
allowlist_externals =
./image-tests.sh