[tox]
minversion = 1.8
envlist = bashate,docs,py27
skipsdist = True

[testenv]
setenv = VIRTUAL_ENV={envdir}
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
whitelist_externals =   virt-filesystems
                        virt-inspector
                        awk
                        mkdir
                        rm
commands =  mkdir -p {toxinidir}/.amp_tox_test
            ./diskimage-create.sh -o {toxinidir}/.amp_tox_test/amphora-x64-haproxy -w {toxworkdir}
# Work around tox limitations with command pipes
# https://bitbucket.org/hpk42/tox/issue/73/pipe-output-of-command-into-file
            ./image-tests.sh {toxinidir}/.amp_tox_test
            rm -rf {toxinidir}/.amp_tox_test

[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

