8f74e2ba28
This commit fixes two issues that are currently blocking the gate. The first is that it bumps the Sphinx requirement to be within acceptable constraints. The second is that it converts oslo.policy to use stestr instead of testr. This is all being done in one patch because proposing them individually causes deadlock (the patch to bump the sphinx requirement fails because we're still using testr and the patch to convert to stestr fails the requirements-check job). The following explains the reasoning behind the stestr change. With the upgrade to oslotest 3.6.0 [0], testr no longer works [1]. This is because oslotest no longer requires testr and we don't depend on it directly in oslo.policy. [0]d5a3c58f71
[1]897823fbd6
Change-Id: I6dac4c8e7b39c9b80cc8f3728763e8d783c9e940
57 lines
1.3 KiB
INI
57 lines
1.3 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py35,py27,pep8,docs
|
|
|
|
[testenv]
|
|
install_command = pip install {opts} {packages}
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
commands = stestr run --slowest {posargs}
|
|
|
|
[testenv:py27]
|
|
basepython = python2.7
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
flake8
|
|
# Run security linter
|
|
bandit -r oslo_policy tests -n5
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
commands = python setup.py test --coverage --coverage-package-name=oslo_policy --testr-args='{posargs}'
|
|
|
|
[flake8]
|
|
|
|
show-source = True
|
|
ignore =
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
|
|
|
[hacking]
|
|
import_exceptions = oslo_policy._i18n
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
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
|