6a2590ec6a
- use generic test template - remove autospec in power test as we don't use actual libvirt module to test. The libvirt-python module is fully mocked. Change-Id: Ied36a8afb818422c643edca8a2feeec977b53551
81 lines
2.2 KiB
INI
81 lines
2.2 KiB
INI
[tox]
|
|
minversion = 3.18.0
|
|
envlist = py3,pep8
|
|
ignore_basepython_conflict=true
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONDONTWRITEBYTECODE = 1
|
|
LANGUAGE=en_US
|
|
LC_ALL=en_US.UTF-8
|
|
TESTS_DIR=./ironic_staging_drivers/tests/unit/
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/extra-requirements.txt
|
|
commands =
|
|
stestr run {posargs}
|
|
passenv = http_proxy
|
|
HTTP_PROXY
|
|
https_proxy
|
|
HTTPS_PROXY
|
|
no_proxy
|
|
NO_PROXY
|
|
|
|
[testenv:pep8]
|
|
deps =
|
|
hacking>=4.1.0,<5.0.0 # Apache-2.0
|
|
doc8>=0.6.0 # Apache-2.0
|
|
flake8-import-order>=0.17.1 # LGPLv3
|
|
pycodestyle>=2.0.0,<3.0.0 # MIT
|
|
commands =
|
|
flake8 {posargs}
|
|
doc8 README.rst CONTRIBUTING.rst HACKING.rst doc/source
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
LANGUAGE=en_US
|
|
PYTHON=coverage run --source ironic_staging_drivers --omit='*tests*' --parallel-mode
|
|
commands =
|
|
coverage erase
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage report --omit='*tests*'
|
|
coverage html -d ./cover --omit='*tests*'
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:pdf-docs]
|
|
deps = {[testenv:docs]deps}
|
|
allowlist_externals = make
|
|
commands =
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:releasenotes]
|
|
deps =
|
|
reno>=2.5.0 # Apache-2.0
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[flake8]
|
|
application-import-names = ironic_staging_drivers
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
|
import-order-style = pep8
|
|
show-source = True
|