7326192b96
Create a tox environment for running the unit tests against the lower bounds of the dependencies. Create a lower-constraints.txt to be used to enforce the lower bounds in those tests. Add openstack-tox-lower-constraints job to the zuul configuration. See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html for more details. Change-Id: I8991c2ab1c880c401fd807e38565258403af05e8 Depends-On: https://review.openstack.org/555034 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
129 lines
4.3 KiB
INI
129 lines
4.3 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py35,py27,pep8,bandit
|
|
|
|
[testenv]
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
passenv = OS_*
|
|
ZUUL_CACHE_DIR
|
|
REQUIREMENTS_PIP_LOCATION
|
|
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 = python setup.py testr --slowest --testr-args='{posargs}'
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
deps = hacking<0.11,>=0.10.0
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
python setup.py test --coverage --coverage-package-name=oslo_messaging --testr-args='{posargs}'
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
basepython = python2.7
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:py27-func-rabbit]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
TRANSPORT_DRIVER=rabbit
|
|
commands = pifpaf run rabbitmq -- python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
|
|
|
|
[testenv:py35-func-rabbit]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
TRANSPORT_DRIVER=rabbit
|
|
basepython = python3.5
|
|
commands = pifpaf run rabbitmq -- python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
|
|
|
|
[testenv:py27-func-kafka]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
TRANSPORT_URL=kafka://127.0.0.1:9092/
|
|
OS_GROUP_REGEX=oslo_messaging.tests.functional
|
|
commands = {toxinidir}/setup-test-env-kafka.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
|
|
|
|
[testenv:py27-func-amqp1]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:65123//
|
|
AMQP1_BACKEND=qpidd
|
|
ENVNAME={envname}
|
|
WORKDIR={toxworkdir}
|
|
commands = {toxinidir}/tools/setup-test-env-amqp1.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
|
|
|
|
[testenv:py35-func-amqp1]
|
|
basepython = python3.5
|
|
setenv =
|
|
{[testenv]setenv}
|
|
TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:65123//
|
|
AMQP1_BACKEND=qpidd
|
|
ENVNAME={envname}
|
|
WORKDIR={toxworkdir}
|
|
commands = {toxinidir}/tools/setup-test-env-amqp1.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
|
|
|
|
[testenv:py27-func-zmq]
|
|
commands = {toxinidir}/setup-test-env-zmq.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
|
|
|
|
[testenv:py35-func-zmq]
|
|
commands = {toxinidir}/setup-test-env-zmq.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
|
|
|
|
[testenv:py27-func-zmq-dyn]
|
|
commands = {toxinidir}/setup-test-env-zmq-direct-dynamic.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
|
|
|
|
[testenv:py27-func-zmq-proxy]
|
|
commands = {toxinidir}/setup-test-env-zmq-proxy.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
|
|
|
|
[testenv:py27-func-zmq-pubsub]
|
|
commands = {toxinidir}/setup-test-env-zmq-pub-sub.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
|
|
|
|
[testenv:bandit]
|
|
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 = bandit -r oslo_messaging -x tests -n5
|
|
|
|
[flake8]
|
|
show-source = True
|
|
enable-extensions = H203,H106
|
|
ignore = H405
|
|
exclude = .tox,dist,doc,*.egg,build,__init__.py
|
|
|
|
[hacking]
|
|
import_exceptions =
|
|
oslo_messaging._i18n
|
|
six.moves
|
|
local-check-factory = oslo_messaging.hacking.checks.factory
|
|
|
|
[testenv:pip-missing-reqs]
|
|
# do not install test-requirements as that will pollute the virtualenv for
|
|
# determining missing packages
|
|
# this also means that pip-missing-reqs must be installed separately, outside
|
|
# of the requirements.txt files
|
|
deps = pip_check_reqs
|
|
commands = pip-missing-reqs -d --ignore-module=oslo_messaging* --ignore-file=oslo_messaging/tests/* --ignore-file=tests/ oslo_messaging
|
|
|
|
[testenv:releasenotes]
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
|
|
[testenv:bindep]
|
|
deps = bindep
|
|
commands = bindep {posargs}
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|