Files
zaza-openstack-tests/tox.ini
2018-10-10 11:34:31 +02:00

60 lines
1.5 KiB
INI

[tox]
envlist = pep8,py3
skipsdist = True
[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
install_command =
pip install {opts} {packages}
commands = nosetests --with-coverage --cover-package=zaza {posargs} {toxinidir}/unit_tests
[testenv:py3]
basepython = python3
deps = -r{toxinidir}/requirements.txt
[testenv:pep8]
basepython = python3
deps = -r{toxinidir}/requirements.txt
commands = flake8 {posargs} zaza unit_tests
[testenv:venv]
basepython = python3
deps = -r{toxinidir}/requirements.txt
commands = /bin/true
[flake8]
ignore = E402,E226
per-file-ignores =
unit_tests/**: D
[testenv:docs]
basepython = python3
changedir = doc/source
deps =
-r{toxinidir}/requirements.txt
commands = sphinx-build -W -b html -d {toxinidir}/doc/build/doctrees . {toxinidir}/doc/build/html
[testenv:func]
basepython = python3
deps = -r{toxinidir}/requirements.txt
commands =
{envdir}/bin/python3 setup.py install
functest-run-suite --keep-model
[testenv:func-travis]
basepython = python3
deps = -r{toxinidir}/requirements.txt
# sudo back to ourself to activate lxd group membership executable search path
whitelist_externals = sudo
passenv = USER
commands =
{envdir}/bin/python3 setup.py install
sudo su {env:USER} -c 'source {envdir}/bin/activate && functest-run-suite --keep-model'
[testenv:remove-placement]
basepython = python3
deps = -r{toxinidir}/requirements.txt
commands =
{envdir}/bin/python3 setup.py install
remove-placement {posargs}