2013-06-15 07:49:11 +01:00
|
|
|
[tox]
|
2019-12-20 10:42:49 +01:00
|
|
|
minversion = 3.1
|
2020-02-03 17:47:44 +01:00
|
|
|
envlist = py37,pep8
|
|
|
|
ignore_basepython_conflict = true
|
2013-06-15 07:49:11 +01:00
|
|
|
|
|
|
|
[testenv]
|
2019-12-20 10:42:49 +01:00
|
|
|
basepython = python3
|
2014-02-26 17:05:07 -08:00
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
2016-03-21 17:36:11 -04:00
|
|
|
passenv = OS_*
|
2016-11-08 14:15:10 +11:00
|
|
|
ZUUL_CACHE_DIR
|
|
|
|
REQUIREMENTS_PIP_LOCATION
|
2017-12-01 09:46:32 +01:00
|
|
|
install_command = pip install {opts} {packages}
|
|
|
|
deps =
|
2019-09-23 16:20:19 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2017-12-01 09:46:32 +01:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|
2018-07-03 09:57:08 +07:00
|
|
|
commands = stestr run --slowest {posargs}
|
2013-06-15 07:49:11 +01:00
|
|
|
|
|
|
|
[testenv:pep8]
|
2018-06-13 16:19:28 -04:00
|
|
|
commands =
|
|
|
|
flake8
|
|
|
|
# run security linter
|
2018-08-27 15:57:54 -04:00
|
|
|
bandit -r oslo_messaging -x tests -n5
|
2013-06-15 07:49:11 +01:00
|
|
|
|
|
|
|
[testenv:cover]
|
2018-08-20 15:20:47 -04:00
|
|
|
setenv =
|
|
|
|
PYTHON=coverage run --source oslo_messaging --parallel-mode
|
2013-06-15 07:49:11 +01:00
|
|
|
commands =
|
2018-08-20 15:20:47 -04:00
|
|
|
stestr run --slowest {posargs}
|
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage report
|
2013-06-15 07:49:11 +01:00
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
2014-06-26 06:32:27 +01:00
|
|
|
[testenv:docs]
|
2019-10-24 14:09:59 +08:00
|
|
|
whitelist_externals = rm
|
2017-12-11 13:49:52 -05:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2019-10-24 14:09:59 +08:00
|
|
|
commands =
|
|
|
|
rm -fr doc/build
|
|
|
|
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
2014-06-26 06:32:27 +01:00
|
|
|
|
2019-04-15 01:13:48 +00:00
|
|
|
[testenv:py36-func-rabbit]
|
2016-11-08 14:15:10 +11:00
|
|
|
setenv =
|
|
|
|
{[testenv]setenv}
|
|
|
|
TRANSPORT_DRIVER=rabbit
|
2018-07-03 09:57:08 +07:00
|
|
|
commands = pifpaf run rabbitmq -- stestr run --slowest {posargs:oslo_messaging.tests.functional}
|
2015-10-01 18:53:17 +03:00
|
|
|
|
2019-04-15 01:13:48 +00:00
|
|
|
[testenv:py36-func-amqp1]
|
2016-08-25 15:52:18 -04:00
|
|
|
setenv =
|
2016-11-08 14:15:10 +11:00
|
|
|
{[testenv]setenv}
|
2018-12-13 12:59:50 -05:00
|
|
|
TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:5672//
|
2016-08-25 15:52:18 -04:00
|
|
|
ENVNAME={envname}
|
|
|
|
WORKDIR={toxworkdir}
|
2018-07-03 09:57:08 +07:00
|
|
|
commands = {toxinidir}/tools/setup-test-env-amqp1.sh stestr run --slowest {posargs:oslo_messaging.tests.functional}
|
2016-07-12 16:35:36 +08:00
|
|
|
|
2019-04-15 01:13:48 +00:00
|
|
|
[testenv:py36-func-kafka]
|
2018-04-17 11:57:48 -04:00
|
|
|
setenv =
|
|
|
|
{[testenv]setenv}
|
|
|
|
TRANSPORT_URL=kafka://127.0.0.1:9092/
|
|
|
|
OS_GROUP_REGEX=oslo_messaging.tests.functional
|
2018-07-03 09:57:08 +07:00
|
|
|
commands = {toxinidir}/setup-test-env-kafka.sh stestr run --slowest {posargs:oslo_messaging.tests.functional}
|
2018-04-17 11:57:48 -04:00
|
|
|
|
2018-06-13 16:19:28 -04:00
|
|
|
|
2015-10-26 11:01:11 +01:00
|
|
|
[testenv:bandit]
|
2018-06-13 16:19:28 -04:00
|
|
|
# NOTE(kgiusti): This is required for the integration test job of the bandit
|
|
|
|
# project. Please do not remove.
|
2018-08-27 15:57:54 -04:00
|
|
|
commands = bandit -r oslo_messaging -x tests -n5
|
2015-10-26 11:01:11 +01:00
|
|
|
|
2013-06-15 07:49:11 +01:00
|
|
|
[flake8]
|
2018-12-28 22:52:08 +08:00
|
|
|
# E731 skipped as assign a lambda expression
|
|
|
|
|
2013-06-15 07:49:11 +01:00
|
|
|
show-source = True
|
2017-06-22 11:01:23 +08:00
|
|
|
enable-extensions = H203,H106
|
2018-12-28 22:52:08 +08:00
|
|
|
ignore = E731,H405
|
2016-02-02 11:34:01 -05:00
|
|
|
exclude = .tox,dist,doc,*.egg,build,__init__.py
|
2014-06-24 14:11:38 +02:00
|
|
|
|
|
|
|
[hacking]
|
|
|
|
import_exceptions =
|
2014-07-18 15:32:56 +02:00
|
|
|
six.moves
|
2015-07-13 21:09:07 +00:00
|
|
|
local-check-factory = oslo_messaging.hacking.checks.factory
|
2015-06-25 21:25:12 -04:00
|
|
|
|
2016-05-19 16:49:51 +03:00
|
|
|
[testenv:releasenotes]
|
2019-10-24 14:09:59 +08:00
|
|
|
whitelist_externals = rm
|
|
|
|
commands =
|
|
|
|
rm -rf releasenotes/build
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
2017-12-11 13:49:52 -05:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2016-12-01 08:17:18 +01:00
|
|
|
|
|
|
|
[testenv:bindep]
|
|
|
|
deps = bindep
|
|
|
|
commands = bindep {posargs}
|
2018-03-22 17:35:56 -04:00
|
|
|
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|