2015-07-02 16:11:19 +00:00
|
|
|
[tox]
|
|
|
|
minversion = 1.6
|
2015-07-21 21:26:04 +00:00
|
|
|
envlist = validate,pep8,bashate
|
2016-12-01 13:58:39 -05:00
|
|
|
skipdist = True
|
2015-07-02 16:11:19 +00:00
|
|
|
|
|
|
|
[testenv]
|
2016-12-01 13:58:39 -05:00
|
|
|
usedevelop=True
|
2016-02-29 11:46:41 -05:00
|
|
|
passenv=ZUUL_CACHE_DIR
|
2015-07-02 16:11:19 +00:00
|
|
|
install_command = pip install -U {opts} {packages}
|
|
|
|
--allow-external lazr.authentication
|
|
|
|
--allow-insecure lazr.authentication
|
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
2015-12-04 15:23:02 +11:00
|
|
|
# launchpadlib 0.0.1.dev533 requires lazr.restfulclient, which is
|
|
|
|
# py2-only (as of lazr.restfulclient 0.13.1)
|
|
|
|
basepython = python2.7
|
2016-11-23 15:26:05 -05:00
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
commands =
|
|
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
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 =
|
2016-03-19 09:50:47 -04:00
|
|
|
yamllint -f parsable -c {toxinidir}/yamllint.yml deliverables
|
2016-02-24 08:03:04 -05:00
|
|
|
validate-request {posargs}
|
2015-07-16 18:59:47 +00:00
|
|
|
|
2015-07-23 18:17:57 +00:00
|
|
|
[testenv:list-changes]
|
2015-07-27 20:22:11 +00:00
|
|
|
setenv =
|
|
|
|
PYTHONUNBUFFERED=1
|
2015-07-23 18:17:57 +00:00
|
|
|
commands = list-changes {posargs}
|
|
|
|
|
2015-07-02 16:11:19 +00:00
|
|
|
[testenv:pep8]
|
2016-01-13 14:12:19 +00:00
|
|
|
deps = flake8>=2.2.4,<=2.4.1
|
2015-07-02 16:11:19 +00:00
|
|
|
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 \
|
|
|
|
-print0 | xargs -0 bashate -v"
|
|
|
|
|
2017-01-09 10:00:01 -05:00
|
|
|
[testenv:aclmanager]
|
|
|
|
commands = python {toxinidir}/tools/aclmanager.py {posargs}
|
|
|
|
|
2015-07-02 16:11:19 +00:00
|
|
|
[testenv:venv]
|
2015-08-26 14:17:06 +00:00
|
|
|
deps = .[sphinxext]
|
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
|
|
|
|
|
|
|
[testenv:cover]
|
|
|
|
#commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
|
2015-08-19 23:23:05 -07:00
|
|
|
[testenv:docs]
|
2016-04-14 11:24:31 -04:00
|
|
|
commands = sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
2015-08-20 09:12:21 -07:00
|
|
|
deps = .[sphinxext]
|
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
|
2016-12-18 10:32:23 +08:00
|
|
|
ignore = E123,E125,E501
|
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
|