dragonflow/tox.ini

119 lines
3.4 KiB
INI

[tox]
minversion = 1.6
envlist = pep8,py27,py35
skipsdist = True
[testenv]
# Note the hash seed is set to 0 until neutron can be tested with a
# random hash seed successfully.
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
PYTHONWARNINGS=default::DeprecationWarning
usedevelop = True
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = sh /bin/rm
commands = /bin/rm -f .testrepository/times.dbm
stestr run {posargs}
[testenv:fullstack]
basepython = python2.7
setenv = OS_TEST_PATH=./dragonflow/tests/fullstack
commands =
ostestr --serial {posargs}
[testenv:pep8]
basepython = python3
commands =
flake8
doc8 {posargs}
neutron-db-manage --subproject dragonflow check_migration
{[testenv:genconfig]commands}
[testenv:genconfig]
basepython = python3
commands = {toxinidir}/tools/generate_config_file_samples.sh
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
setenv =
PYTHON=coverage run --source $project --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
[flake8]
# E126 continuation line over-indented for hanging indent
# H404 multi line docstring should start with a summary
# H405 multi line docstring summary not separated with an empty line
# N530 Direct neutron imports not allowed
ignore = E126,H404,H405,N530
# H904: Delay string interpolations at logging calls
# H203: Use assertIs(Not)None to check for None
# H204: Use assert(Not)Equal to check for equality
# H205: Use assert(Greater|Less)(Equal) for comparison
enable-extensions=H904,H203,H204,H205
show-source = true
exclude = ./.*,dist,doc,build,tools
[doc8]
ignore-path = .venv,.git,.tox,.tmp,*dragonflow/locale*,*lib/python*,dragonflow.egg*,doc/build,releasenotes/*,doc/source/contributor/api
[testenv:pylint]
basepython = python3
deps =
{[testenv]deps}
pylint
commands =
pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron}
[hacking]
import_exceptions = dragonflow._i18n
local-check-factory = neutron_lib.hacking.checks.factory
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
[testenv:dev]
# run locally (not in the gate) using editable mode
# https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs
# note that order is important to ensure dependencies don't override
commands =
pip install -q -e "git+https://git.openstack.org/openstack/networking-sfc#egg=networking_sfc"
pip install -q -e "git+https://git.openstack.org/openstack/neutron-dynamic-routing#egg=neutron_dynamic_routing"
pip install -q -e "git+https://git.openstack.org/openstack/neutron#egg=neutron"
[testenv:py3-dev]
basepython = python3
commands =
{[testenv:dev]commands}
{[testenv]commands}
[testenv:pep8-dev]
deps =
{[testenv]deps}
commands =
{[testenv:dev]commands}
{[testenv:pep8]commands}