2014-11-05 19:05:16 +00:00
|
|
|
[tox]
|
|
|
|
minversion = 1.8
|
2019-01-24 07:42:46 +00:00
|
|
|
envlist = bashate,docs,build,test
|
2014-11-05 19:05:16 +00:00
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
[testenv]
|
2019-01-24 07:42:46 +00:00
|
|
|
basepython = python3
|
|
|
|
envdir = {toxworkdir}/venv
|
2014-11-05 19:05:16 +00:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2019-08-29 23:21:39 +00:00
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY DIB_* CLOUD_INIT_DATASOURCES OCTAVIA_REPO_PATH
|
2014-11-05 19:05:16 +00:00
|
|
|
install_command = pip install -U {opts} {packages}
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2016-07-05 09:31:07 +00:00
|
|
|
whitelist_externals = virt-filesystems
|
2014-11-05 19:05:16 +00:00
|
|
|
virt-inspector
|
2016-07-05 09:31:07 +00:00
|
|
|
awk
|
2014-11-05 19:05:16 +00:00
|
|
|
mkdir
|
|
|
|
rm
|
|
|
|
|
|
|
|
[testenv:docs]
|
2017-07-11 14:40:40 +00:00
|
|
|
commands = doc8 README.rst ../elements/haproxy-octavia/README.rst ../elements/root-passwd/README.rst
|
2014-11-05 19:05:16 +00:00
|
|
|
|
|
|
|
[testenv:bashate]
|
|
|
|
commands = bashate diskimage-create.sh
|
|
|
|
bashate image-tests.sh
|
|
|
|
|
2019-01-24 07:42:46 +00:00
|
|
|
[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.
|
2019-08-29 23:21:39 +00:00
|
|
|
commands = ./diskimage-create.sh -o {toxinidir}/amphora-x64-haproxy -w {toxworkdir} -c {toxworkdir}/.cache
|
2019-01-24 07:42:46 +00:00
|
|
|
|
|
|
|
[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
|