oslo.rootwrap/tox.ini

77 lines
1.9 KiB
INI

[tox]
minversion = 2.0
envlist = py27,py37,pep8
[testenv]
install_command = pip install {opts} {packages}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
# Functional tests with Eventlet involve monkeypatching, so force them to be
# run in a separate process
whitelist_externals = env
commands =
stestr run --slowest (?!tests.test_functional_eventlet)tests {posargs}
env TEST_EVENTLET=1 stestr run --slowest tests.test_functional_eventlet
[testenv:py27]
basepython = python2.7
[testenv:pep8]
basepython = python3
deps =
-r{toxinidir}/test-requirements.txt
commands =
flake8
# Run security linter
bandit -r oslo_rootwrap tests -n5 --skip B404
[testenv:cover]
basepython = python3
deps = {[testenv]deps}
coverage
setenv =
PYTHON=coverage run --source $project --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[flake8]
# E731 skipped as assign a lambda expression
show-source = True
ignore = E731
exclude = .tox,dist,doc,*.egg,build
[testenv:benchmark]
basepython = python2.7
commands = python benchmark/benchmark.py
[testenv:benchmark3]
basepython = python3
commands = python3 benchmark/benchmark.py
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt