
Bindep is a tool for checking the presence of binary packages needed to use an application / library. It started life as a way to make it easier to set up a development environment for OpenStack projects. Change-Id: I1a6cfa255a6473febf0fb7b7d4f1bf8ca32d02c2 Depends-On: https://review.openstack.org/563717 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
106 lines
2.9 KiB
INI
106 lines
2.9 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py35,py27,pep8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
find bandit -type f -name "*.pyc" -delete
|
|
stestr run {posargs}
|
|
whitelist_externals =
|
|
find
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper -t tests {posargs}
|
|
|
|
[testenv:linters]
|
|
deps = {[testenv:pep8]deps}
|
|
usedevelop = False
|
|
commands = flake8 {posargs} bandit
|
|
flake8 {posargs} tests
|
|
bandit-baseline -r bandit -ll -ii
|
|
|
|
[testenv:pep8]
|
|
deps = {[testenv]deps}
|
|
.
|
|
usedevelop = False
|
|
commands = flake8 {posargs} bandit
|
|
flake8 {posargs} tests
|
|
{[testenv:pylint]commands}
|
|
bandit-baseline -r bandit -ll -ii
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:codesec]
|
|
deps = {[testenv]deps}
|
|
.
|
|
usedevelop = False
|
|
commands = bandit-baseline -r bandit -ll -ii
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source bandit --parallel-mode
|
|
commands =
|
|
coverage erase
|
|
stestr run '{posargs}'
|
|
coverage report
|
|
|
|
[testenv:openstack_coverage]
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
PyYAML>=3.1.0
|
|
requests>=2.7.0
|
|
commands = python tools/openstack_coverage.py
|
|
|
|
[testenv:integration]
|
|
passenv = REPO_ROOT
|
|
whitelist_externals = bash
|
|
commands = bash scripts/integration-test.sh {posargs}
|
|
|
|
[testenv:docs]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands=
|
|
python setup.py build_sphinx
|
|
|
|
[flake8]
|
|
# [H106] Don't put vim configuration in source files.
|
|
# [H203] Use assertIs(Not)None to check for None.
|
|
show-source = True
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,releasenotes
|
|
enable-extensions = H106,H203
|
|
|
|
[testenv:releasenotes]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:pylint]
|
|
commands = pylint --rcfile=pylintrc bandit
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
# This environment can be used to quickly validate that all needed system
|
|
# packages required to successfully execute test targets are installed
|
|
[testenv:bindep]
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
# separately, outside of the requirements files.
|
|
deps = bindep
|
|
commands = bindep test
|