2015-07-02 16:11:19 +00:00
|
|
|
[tox]
|
2020-02-17 11:19:24 +01:00
|
|
|
minversion = 3.2.0
|
2021-04-20 14:56:56 +08:00
|
|
|
envlist = py3,validate,pep8,bashate,docs
|
2021-06-17 17:08:58 +00:00
|
|
|
skipsdist = True
|
2019-04-17 14:33:41 +10:00
|
|
|
ignore_basepython_conflict=true
|
2022-03-28 11:29:09 +02: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 13:58:39 -05:00
|
|
|
usedevelop=True
|
2017-10-16 09:18:04 -04:00
|
|
|
passenv=
|
|
|
|
ZUUL_CACHE_DIR
|
|
|
|
HOME
|
2015-07-02 16:11:19 +00:00
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
2017-08-27 09:33:05 -04:00
|
|
|
PYTHONUNBUFFERED=1
|
2017-11-21 10:20:40 -05:00
|
|
|
LOGDIR={envdir}/log
|
2018-03-10 15:24:50 -05:00
|
|
|
TMPDIR={envdir}/tmp
|
2018-07-09 13:41:46 +07:00
|
|
|
PYTHON=coverage run --source openstack_releases --parallel-mode
|
2018-09-24 09:15:26 -04:00
|
|
|
OS_STDOUT_CAPTURE=1
|
|
|
|
OS_STDERR_CAPTURE=1
|
|
|
|
OS_DEBUG=1
|
|
|
|
OS_LOG_CAPTURE=1
|
2017-03-03 14:36:15 -05:00
|
|
|
basepython = python3
|
2021-09-17 10:12:50 +00:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2016-11-23 15:26:05 -05:00
|
|
|
commands =
|
2018-10-09 21:25:24 +00:00
|
|
|
stestr run {posargs}
|
2018-07-09 13:41:46 +07: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 08:03:04 -05:00
|
|
|
deps =
|
2020-05-10 17:40:43 -05:00
|
|
|
yamllint==1.4.1
|
|
|
|
-r{toxinidir}/requirements.txt
|
2016-02-24 08:03:04 -05:00
|
|
|
commands =
|
2017-12-05 23:38:14 -05:00
|
|
|
{toxinidir}/tools/tox-log-command.sh {toxinidir}/tools/run_yamllint.sh
|
2018-02-20 14:46:16 -05:00
|
|
|
{toxinidir}/tools/tox-log-command.sh check-schema {posargs}
|
2017-11-21 10:20:40 -05: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 19:08:51 -04: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
|
|
|
|
whitelist_externals = bash
|
|
|
|
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 07:20:50 -05: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 16:10:11 +01:00
|
|
|
-print0 | xargs -0 bashate -i E006 -v"
|
2015-07-02 16:11:19 +00:00
|
|
|
|
2017-01-09 10:00:01 -05:00
|
|
|
[testenv:aclmanager]
|
|
|
|
commands = python {toxinidir}/tools/aclmanager.py {posargs}
|
|
|
|
|
2019-11-21 16:23:19 +01:00
|
|
|
[testenv:check_approval]
|
|
|
|
commands = python {toxinidir}/tools/check_approval.py {posargs}
|
|
|
|
|
2019-01-16 16:56:48 +01: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-19 23:23:05 -07:00
|
|
|
[testenv:docs]
|
2017-12-18 15:29:36 -06:00
|
|
|
deps =
|
2020-04-19 17:47:22 +02:00
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2017-12-18 15:29:36 -06:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2018-01-02 11:01:51 -05:00
|
|
|
commands =
|
2020-04-11 15:47:13 -05:00
|
|
|
sphinx-build -v -a -E -W -j auto -d doc/build/doctrees -b html doc/source doc/build/html
|
2019-03-02 15:31:01 +11:00
|
|
|
whereto {toxinidir}/doc/build/html/.htaccess {toxinidir}/doc/build/redirect-tests.txt
|
2015-08-19 23:23:05 -07: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 16:20:03 -05: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 16:20:03 -05:00
|
|
|
ignore = E123,E125,E501,W504
|
2015-07-02 16:11:19 +00:00
|
|
|
builtins = _
|
2016-10-31 11:49:20 +07:00
|
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-*
|
2016-06-27 14:05:25 +02: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
|