2015-07-02 16:11:19 +00:00
|
|
|
[tox]
|
2020-02-17 11:19:24 +01:00
|
|
|
minversion = 3.2.0
|
2019-07-05 15:57:02 -04:00
|
|
|
envlist = py37,validate,pep8,bashate,docs
|
2016-12-01 13:58:39 -05:00
|
|
|
skipdist = True
|
2019-04-17 14:33:41 +10:00
|
|
|
ignore_basepython_conflict=true
|
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
|
2016-11-23 15:26:05 -05:00
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
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 =
|
2016-10-12 08:55:34 -04:00
|
|
|
yamllint==1.4.1
|
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 =
|
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2018-01-02 11:01:51 -05:00
|
|
|
commands =
|
2018-10-09 10:46:37 -04:00
|
|
|
sphinx-build -v -a -E -W -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
|
|
|
|
show-source = True
|
2018-02-11 17:51:18 +01:00
|
|
|
ignore = E123,E125,E501,H405
|
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
|