209028bb4e
TrivialFix:In the change[1] os_testr changed under the covers from using testr to stestr, so that we now get the following warning: ostestr.py:120: UserWarning: No .stestr.conf file found in the CWD. Please create one to to replace the .testr.conf. You can find a script to do this in the stestr git repository. So remove the .testr.conf and add .stestr.conf which was generated using a utility script as documented here [2]. [1] Id7cb2a39a8308f1413608dcf19273a1d7f33592e [2] https://media.readthedocs.org/pdf/stestr/stable/stestr.pdf Change-Id: I084215311928c0e66d45977748e5a2263bbc1444
78 lines
2.0 KiB
INI
78 lines
2.0 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py27,pep8,py35
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONDONTWRITEBYTECODE = 1
|
|
LANGUAGE=en_US
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
/bin/rm -f .testrepository/times.dbm
|
|
ostestr --slowest {posargs}
|
|
whitelist_externals = bash
|
|
passenv = *_proxy *_PROXY
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:debug-py27]
|
|
basepython = python2.7
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:debug-py35]
|
|
basepython = python3.5
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs}
|
|
# Run security linter
|
|
bandit -c bandit.yaml -r glare -n5 -p gate
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source glare --parallel-mode --omit="*/test*"
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:genconfig]
|
|
commands =
|
|
oslo-config-generator --config-file etc/oslo-config-generator/glare.conf
|
|
|
|
[testenv:genpolicy]
|
|
sitepackages = False
|
|
envdir = {toxworkdir}/venv
|
|
commands =
|
|
oslopolicy-sample-generator --namespace=glare --output-file=etc/policy.yaml.sample
|
|
|
|
[testenv:docs]
|
|
basepython = python2.7
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:bandit]
|
|
commands = bandit -c bandit.yaml -r glare -n5 -p gate
|
|
|
|
[flake8]
|
|
# TODO(dmllr): Analyze or fix the warnings blacklisted below
|
|
# H404 multi line docstring should start with a summary
|
|
# H405 multi line docstring summary not separated with an empty line
|
|
ignore = H404,H405
|
|
exclude = .venv,.git,.tox,dist,doc,etc,*glare/locale*,*lib/python*,*egg,build
|
|
# H904 Delay string interpolations at logging calls.
|
|
enable-extensions = H106,H203,H904
|
|
|
|
[hacking]
|
|
local-check-factory = glare.hacking.checks.factory
|
|
import_exceptions = glare.i18n
|