695b73a08b
The current linkcheck tox target fails on a fresh neutron-lib clone due to the /modules not existing under doc/source/reference. This patch fixes the issue by ensuring the modules are generated before running the linkcheck target. Change-Id: Ie55b855c9469435b6f8ef4b3459c3082860f93c0
70 lines
1.8 KiB
INI
70 lines
1.8 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py35,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
|
|
{toxinidir}/tools/check_samples.sh
|
|
|
|
[testenv:releasenotes]
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[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 = python setup.py build_sphinx
|
|
|
|
[testenv:api-ref]
|
|
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:linkcheck]
|
|
whitelist_externals = rm
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -W -b linkcheck api-ref/source api-ref/build/linkcheck
|
|
rm -rf doc/build
|
|
python setup.py build_sphinx
|
|
sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper -t neutron_lib/tests/unit {posargs}
|
|
|
|
[testenv:api-report]
|
|
commands =
|
|
{toxinidir}/tools/api_report.sh
|
|
|
|
[flake8]
|
|
# H904: Delay string interpolations at logging calls
|
|
enable-extensions=H904
|
|
show-source = True
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools
|
|
import-order-style = pep8
|
|
|
|
[hacking]
|
|
import_exceptions = neutron_lib._i18n
|
|
local-check-factory = neutron_lib.hacking.checks._neutron_lib_factory
|