deb-networking-cisco/tox.ini

108 lines
4.0 KiB
INI
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[tox]
envlist = py35,py34,py27,pep8
minversion = 2.0
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
DEFAULT_NEUTRON_BRANCH=mitaka-eol
UPPER_CONSTRAINTS_FILE=https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/mitaka
passenv = TRACE_FAILONLY http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY NEUTRON_BRANCH NEUTRONCLIENT_BRANCH
usedevelop = True
install_command = {toxinidir}/tools/tox_install.sh {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = sh
# There is secret magic in ostestr which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable.
commands = ostestr {posargs}
[testenv:newton]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
DEFAULT_NEUTRON_BRANCH=stable/newton
UPPER_CONSTRAINTS_FILE=https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/newton
[testenv:ocata]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
DEFAULT_NEUTRON_BRANCH=stable/ocata
UPPER_CONSTRAINTS_FILE=https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata
[testenv:master]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
DEFAULT_NEUTRON_BRANCH=master
UPPER_CONSTRAINTS_FILE=https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt
[testenv:hashtest]
# This is the same as default environment, but with a random PYTHONHASHSEED.
# You can also specify a specific hashseed (for test repeatability) as follows:
# tox --hashseed 1235130571 -e hashtest
setenv = VIRTUAL_ENV={envdir}
[testenv:pep8]
commands =
# If it is easier to add a check via a shell script, consider adding it in this file
sh ./tools/misc-sanity-checks.sh
flake8
neutron-db-manage --subproject networking-cisco check_migration
whitelist_externals = sh
[testenv:releasenotes]
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:i18n]
commands = python ./tools/check_i18n.py ./networking_cisco ./tools/i18n_cfg.py
[testenv:compare-cover]
# Will do coverage on baseline (HEAD^) and recent commit (HEAD) and compare
# results. Used in CI to test commit. Can be used locally, and will include
# any uncommitted changes.
commands = {toxinidir}/networking_cisco/tests/ci/cover.bash {posargs}
[testenv:cover]
# For running coverage in local environment.
commands =
python setup.py test --coverage --coverage-package-name=networking_cisco --testr-args='{posargs}'
[testenv:venv]
# TODO(pc_m): Remove install_command, once infra supports constraints for
# this target.
setenv = UPPER_CONSTRAINTS_FILE=unconstrained
install_command = {toxinidir}/tools/tox_install.sh {opts} {packages}
commands = {posargs}
[testenv:docs]
commands = python setup.py build_sphinx
[flake8]
# E125 continuation line does not distinguish itself from next logical line
# E126 continuation line over-indented for hanging indent
# E128 continuation line under-indented for visual indent
# E129 visually indented line with same indent as next logical line
# E265 block comment should start with #
# H305 imports not grouped correctly
# H404 multi line docstring should start with a summary
# H405 multi line docstring summary not separated with an empty line
# TODO(dougwig) -- uncomment this to test for remaining linkages
# N530 direct neutron imports not allowed
ignore = E125,E126,E128,E129,E265,H305,H404,H405,N530
show-source = true
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,src,tools
[testenv:pylint]
deps =
{[testenv]deps}
pylint
commands =
pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron}
[hacking]
import_exceptions = networking_cisco._i18n
local-check-factory = neutron_lib.hacking.checks.factory