2015-07-02 16:11:19 +00:00
|
|
|
[tox]
|
2020-02-17 10:19:24 +00:00
|
|
|
minversion = 3.2.0
|
2021-04-20 06:56:56 +00:00
|
|
|
envlist = py3,validate,pep8,bashate,docs
|
2021-06-17 17:08:58 +00:00
|
|
|
skipsdist = True
|
2019-04-17 04:33:41 +00:00
|
|
|
ignore_basepython_conflict=true
|
2022-03-28 09:29:09 +00:00
|
|
|
# note(elod.illes): setuptools capping / pinning does not work as it is
|
|
|
|
# pinned inside virtualenv. So to cap / pin setuptools we need to do it
|
|
|
|
# via virtualenv. Virtualenv 20.13.3 is the last version that holds
|
|
|
|
# setuptools < 61.0.0
|
|
|
|
requires = virtualenv==20.13.3
|
2015-07-02 16:11:19 +00:00
|
|
|
|
|
|
|
[testenv]
|
2016-12-01 18:58:39 +00:00
|
|
|
usedevelop=True
|
2017-10-16 13:18:04 +00:00
|
|
|
passenv=
|
|
|
|
ZUUL_CACHE_DIR
|
|
|
|
HOME
|
2015-07-02 16:11:19 +00:00
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
2017-08-27 13:33:05 +00:00
|
|
|
PYTHONUNBUFFERED=1
|
2017-11-21 15:20:40 +00:00
|
|
|
LOGDIR={envdir}/log
|
2018-03-10 20:24:50 +00:00
|
|
|
TMPDIR={envdir}/tmp
|
2018-07-09 06:41:46 +00:00
|
|
|
PYTHON=coverage run --source openstack_releases --parallel-mode
|
2018-09-24 13:15:26 +00:00
|
|
|
OS_STDOUT_CAPTURE=1
|
|
|
|
OS_STDERR_CAPTURE=1
|
|
|
|
OS_DEBUG=1
|
|
|
|
OS_LOG_CAPTURE=1
|
2017-03-03 19:36:15 +00:00
|
|
|
basepython = python3
|
2021-09-17 10:12:50 +00:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2016-11-23 20:26:05 +00:00
|
|
|
commands =
|
2018-10-09 21:25:24 +00:00
|
|
|
stestr run {posargs}
|
2018-07-09 06:41:46 +00:00
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
coverage report --show-missing
|
2015-07-02 16:11:19 +00:00
|
|
|
|
2015-07-16 18:59:47 +00:00
|
|
|
[testenv:validate]
|
2016-02-24 13:03:04 +00:00
|
|
|
deps =
|
2020-05-10 22:40:43 +00:00
|
|
|
yamllint==1.4.1
|
|
|
|
-r{toxinidir}/requirements.txt
|
2016-02-24 13:03:04 +00:00
|
|
|
commands =
|
2017-12-06 04:38:14 +00:00
|
|
|
{toxinidir}/tools/tox-log-command.sh {toxinidir}/tools/run_yamllint.sh
|
2018-02-20 19:46:16 +00:00
|
|
|
{toxinidir}/tools/tox-log-command.sh check-schema {posargs}
|
2017-11-21 15:20:40 +00:00
|
|
|
{toxinidir}/tools/tox-log-command.sh validate-request {posargs}
|
2015-07-16 18:59:47 +00:00
|
|
|
|
2015-07-23 18:17:57 +00:00
|
|
|
[testenv:list-changes]
|
2017-10-25 23:08:51 +00:00
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/tox-log-command.sh list-changes {posargs}
|
2015-07-23 18:17:57 +00:00
|
|
|
|
2015-07-02 16:11:19 +00:00
|
|
|
[testenv:pep8]
|
|
|
|
commands = flake8
|
|
|
|
|
|
|
|
[testenv:bashate]
|
|
|
|
deps = bashate
|
2023-03-07 15:38:31 +00:00
|
|
|
allowlist_externals = bash
|
2015-07-02 16:11:19 +00:00
|
|
|
commands = bash -c "find {toxinidir} \
|
Do not fail with Tox 2.3.1
Latest tox causes failures:
File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 1140, in processcommand
argv = list(shlexer)
File "/usr/lib/python2.7/shlex.py", line 269, in next
token = self.get_token()
File "/usr/lib/python2.7/shlex.py", line 96, in get_token
raw = self.read_token()
File "/usr/lib/python2.7/shlex.py", line 172, in read_token
raise ValueError, "No closing quotation"
ValueError: No closing quotation
This is caused by a backwards incompatible change in tox:
https://bitbucket.org/hpk42/tox/issues/181
We need to work with both older and newer tox versions, so let's remove
the comment at the end of the line
Change-Id: Id5ec8aeb700fcf9a63888e41e408d26b6e3e8481
2015-12-21 12:20:50 +00:00
|
|
|
-not \( -type d -name .?\* -prune \) \
|
|
|
|
-type f \
|
|
|
|
-not -name \*~ \
|
2015-07-02 16:11:19 +00:00
|
|
|
-not -name \*.md \
|
|
|
|
-name \*.sh \
|
2020-01-22 15:10:11 +00:00
|
|
|
-print0 | xargs -0 bashate -i E006 -v"
|
2015-07-02 16:11:19 +00:00
|
|
|
|
2017-01-09 15:00:01 +00:00
|
|
|
[testenv:aclmanager]
|
|
|
|
commands = python {toxinidir}/tools/aclmanager.py {posargs}
|
|
|
|
|
2019-11-21 15:23:19 +00:00
|
|
|
[testenv:check_approval]
|
|
|
|
commands = python {toxinidir}/tools/check_approval.py {posargs}
|
|
|
|
|
2019-01-16 15:56:48 +00:00
|
|
|
[testenv:membership_freeze_test]
|
|
|
|
commands = python {toxinidir}/tools/membership_freeze_test.py {posargs}
|
|
|
|
|
2015-07-02 16:11:19 +00:00
|
|
|
[testenv:venv]
|
2015-07-02 19:30:09 +00:00
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[testenv:history]
|
|
|
|
commands = {toxinidir}/tools/build_tag_history.sh {toxinidir}
|
2015-07-02 16:11:19 +00:00
|
|
|
|
2015-08-20 06:23:05 +00:00
|
|
|
[testenv:docs]
|
2017-12-18 21:29:36 +00:00
|
|
|
deps =
|
2020-04-19 15:47:22 +00:00
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2017-12-18 21:29:36 +00:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2018-01-02 16:01:51 +00:00
|
|
|
commands =
|
2020-04-11 20:47:13 +00:00
|
|
|
sphinx-build -v -a -E -W -j auto -d doc/build/doctrees -b html doc/source doc/build/html
|
2019-03-02 04:31:01 +00:00
|
|
|
whereto {toxinidir}/doc/build/html/.htaccess {toxinidir}/doc/build/redirect-tests.txt
|
2015-08-20 06:23:05 +00:00
|
|
|
|
2015-07-02 16:11:19 +00:00
|
|
|
[flake8]
|
|
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
|
|
# E501 skipped because some of the code files include templates
|
|
|
|
# that end up quite wide
|
2020-07-27 21:20:03 +00:00
|
|
|
# W504 line break after binary operator skipped as it's just wrong
|
2015-07-02 16:11:19 +00:00
|
|
|
show-source = True
|
2020-07-27 21:20:03 +00:00
|
|
|
ignore = E123,E125,E501,W504
|
2015-07-02 16:11:19 +00:00
|
|
|
builtins = _
|
2016-10-31 04:49:20 +00:00
|
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-*
|
2016-06-27 12:05:25 +00:00
|
|
|
|
|
|
|
[testenv:bindep]
|
|
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
|
|
# separately, outside of the requirements files.
|
|
|
|
deps = bindep
|
|
|
|
commands = bindep test
|