nova-lxd/tox.ini

81 lines
2.0 KiB
INI

[tox]
minversion = 2.0
envlist = py{3,27},pep8
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
EVENTLET_NO_GREENDNS=yes
PYTHONDONTWRITEBYTECODE=1
LANGUAGE=en_US
LC_ALL=en_US.utf-8
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-egit+https://github.com/openstack/nova.git#egg=nova
whitelist_externals =
bash
find
rm
env
commands =
find . -type f -name "*.pyc" -delete
rm -Rf .testrepository/times.dbm
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG GENERATE_HASHES
[testenv:py27]
commands =
{[testenv]commands}
/bin/cp -r {toxinidir}/nova/virt/lxd/ {toxinidir}/.tox/py27/src/nova/nova/virt/
stestr run {posargs}
[testenv:py3]
basepython = python3
commands =
{[testenv]commands}
/bin/cp -r {toxinidir}/nova/virt/lxd/ {toxinidir}/.tox/py3/src/nova/nova/virt/
stestr run {posargs}
[testenv:pep8]
basepython = python3
deps = {[testenv]deps}
commands =
flake8 {toxinidir}/nova
flake8 {toxinidir}/nova_lxd_tempest_plugin
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
commands =
coverage erase
find . -type f -name "*.pyc" -delete
python setup.py testr --coverage --testr-args='{posargs}'
coverage report
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[flake8]
# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125,H803,H904,H405,H404,H305,H306,H307
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools/colorizer.py
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt