2013-06-15 07:49:11 +01:00
|
|
|
[tox]
|
2021-06-04 15:10:14 +08:00
|
|
|
minversion = 3.18.0
|
2023-01-13 12:00:40 +00:00
|
|
|
envlist = py3, pep8
|
2013-06-15 07:49:11 +01:00
|
|
|
|
|
|
|
[testenv]
|
2023-01-13 12:00:40 +00:00
|
|
|
passenv =
|
|
|
|
OS_*
|
|
|
|
ZUUL_CACHE_DIR
|
|
|
|
REQUIREMENTS_PIP_LOCATION
|
2017-12-01 09:46:32 +01:00
|
|
|
deps =
|
2020-11-04 10:49:02 +01:00
|
|
|
-c{env:TOX_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
|
2023-01-13 12:00:40 +00: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 =
|
2020-08-21 15:12:08 +02:00
|
|
|
pre-commit run -a
|
2018-06-13 16:19:28 -04:00
|
|
|
# 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 =
|
2023-01-13 12:00:40 +00:00
|
|
|
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]
|
2021-06-04 15:10:14 +08:00
|
|
|
allowlist_externals = rm
|
2023-01-13 12:00:40 +00:00
|
|
|
deps =
|
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
|
|
-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-08-21 10:39:49 -04:00
|
|
|
# The following functional test scenarios are defined for the
|
2023-01-13 12:00:40 +00:00
|
|
|
# testing of the messaging backends and to demonstrated the functional
|
2019-08-21 10:39:49 -04:00
|
|
|
# correctness across driver combinations (e.g. RPC and Notify)
|
|
|
|
#
|
|
|
|
# RPC Notify
|
|
|
|
# -------- --------
|
|
|
|
# scenario01 rabbit rabbit
|
|
|
|
# scenario02 rabbit kafka
|
|
|
|
# scenario03 amqp rabbit
|
|
|
|
# scenario04 amqp kafka
|
|
|
|
#
|
2023-01-13 12:00:27 +00:00
|
|
|
[testenv:py310-func-scenario01]
|
2016-11-08 14:15:10 +11:00
|
|
|
setenv =
|
2023-01-13 12:00:40 +00:00
|
|
|
SCENARIO=scenario01
|
|
|
|
allowlist_externals =
|
|
|
|
{toxinidir}/tools/setup-scenario-env.sh
|
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/setup-scenario-env.sh stestr run --slowest {posargs:oslo_messaging.tests.functional}
|
2015-10-01 18:53:17 +03:00
|
|
|
|
2023-01-13 12:00:27 +00:00
|
|
|
[testenv:py310-func-scenario02]
|
2016-08-25 15:52:18 -04:00
|
|
|
setenv =
|
2023-01-13 12:00:40 +00:00
|
|
|
SCENARIO=scenario02
|
|
|
|
allowlist_externals =
|
|
|
|
{toxinidir}/tools/setup-scenario-env.sh
|
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/setup-scenario-env.sh stestr run --slowest {posargs:oslo_messaging.tests.functional}
|
2019-08-21 10:39:49 -04:00
|
|
|
|
2023-01-13 12:00:27 +00:00
|
|
|
[testenv:py310-func-scenario03]
|
2019-08-21 10:39:49 -04:00
|
|
|
setenv =
|
2023-01-13 12:00:40 +00:00
|
|
|
SCENARIO=scenario03
|
|
|
|
ENVNAME={envname}
|
|
|
|
WORKDIR={toxworkdir}
|
|
|
|
allowlist_externals =
|
|
|
|
{toxinidir}/tools/setup-scenario-env.sh
|
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/setup-scenario-env.sh stestr run --slowest {posargs:oslo_messaging.tests.functional}
|
2016-07-12 16:35:36 +08:00
|
|
|
|
2023-01-13 12:00:27 +00:00
|
|
|
[testenv:py310-func-scenario04]
|
2018-04-17 11:57:48 -04:00
|
|
|
setenv =
|
2023-01-13 12:00:40 +00:00
|
|
|
SCENARIO=scenario04
|
|
|
|
ENVNAME={envname}
|
|
|
|
WORKDIR={toxworkdir}
|
|
|
|
allowlist_externals =
|
|
|
|
{toxinidir}/tools/setup-scenario-env.sh
|
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/setup-scenario-env.sh stestr run --slowest {posargs:oslo_messaging.tests.functional}
|
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.
|
2023-01-13 12:00:40 +00: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]
|
|
|
|
show-source = True
|
2017-06-22 11:01:23 +08:00
|
|
|
enable-extensions = H203,H106
|
2023-01-13 12:00:40 +00:00
|
|
|
# E731 skipped as assign a lambda expression
|
2020-03-27 19:16:32 +01:00
|
|
|
ignore = E731,H405,W504
|
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 =
|
2020-03-27 19:16:32 +01:00
|
|
|
|
|
|
|
[flake8:local-plugins]
|
|
|
|
extension =
|
|
|
|
O321 = checks:check_oslo_namespace_imports
|
|
|
|
O324 = checks:CheckForLoggingIssues
|
|
|
|
paths = ./oslo_messaging/hacking
|
2015-06-25 21:25:12 -04:00
|
|
|
|
2016-05-19 16:49:51 +03:00
|
|
|
[testenv:releasenotes]
|
2023-01-13 12:00:40 +00:00
|
|
|
allowlist_externals =
|
|
|
|
rm
|
2019-10-24 14:09:59 +08:00
|
|
|
commands =
|
|
|
|
rm -rf releasenotes/build
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
2023-01-13 12:00:40 +00:00
|
|
|
deps =
|
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2016-12-01 08:17:18 +01:00
|
|
|
|
|
|
|
[testenv:bindep]
|
2023-01-13 12:00:40 +00:00
|
|
|
deps =
|
|
|
|
bindep
|
2016-12-01 08:17:18 +01:00
|
|
|
commands = bindep {posargs}
|