dragonflow/tox.ini
Doug Hellmann 5b1b5327b2 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: I7471f66742e4c843321d771408d0da67d9800da1
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-12 11:20:48 +03:00

80 lines
2.3 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
ostestr '{posargs}'
[testenv:fullstack]
basepython = python2.7
setenv = OS_TEST_PATH=./dragonflow/tests/fullstack
commands =
ostestr --serial '{posargs}'
[testenv:pep8]
commands =
flake8
neutron-db-manage --subproject dragonflow check_migration
{[testenv:genconfig]commands}
[testenv:genconfig]
commands = {toxinidir}/tools/generate_config_file_samples.sh
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands =
python setup.py testr --coverage --testr-args='{posargs}'
coverage report
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:docs]
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
[testenv:pylint]
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