neutron-lib/tox.ini
Ihar Hrachyshka b5454ede0e Add support for upper-constraints.txt for all tox targets
This will make neutron-lib gate use dependency versions that are sanity
checked by jobs in openstack/requirements gate.

Since the library is itself in upper-constraints.txt file, we should
remove its entry from the constraints file before applying it, otherwise
pip will fail due to version conflict between what's in the current
library repo and what's in constraints file.

Change-Id: I6a708e7b618f2f2da9c9210a19e4d4e4ac370462
2016-09-20 13:20:38 +00:00

60 lines
1.6 KiB
INI

[tox]
minversion = 2.0
envlist = py35,py34,py27,pep8
skipsdist = True
[testenv]
usedevelop = True
passenv = TRACE_FAILONLY
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
ostestr --regex '{posargs}'
[testenv:pep8]
commands =
flake8
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands =
python setup.py test --coverage --coverage-package-name=neutron_lib --testr-args='{posargs}'
coverage report
[testenv:docs]
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
# NOTE(sdague): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
install_command = pip install -U --force-reinstall {opts} {packages}
whitelist_externals = rm
commands =
rm -rf api-ref/build
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[testenv:debug]
commands = oslo_debug_helper {posargs}
[testenv:api-report]
commands =
{toxinidir}/tools/api_report.sh
[flake8]
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools
[hacking]
import_exceptions = neutron_lib._i18n
local-check-factory = neutron_lib.hacking.checks.factory