2011-12-30 14:03:15 -08:00
|
|
|
[tox]
|
2013-12-03 23:32:07 +11:00
|
|
|
minversion = 1.6
|
2014-09-03 19:03:36 +00:00
|
|
|
envlist = py27,py33,py34,pep8
|
2013-12-03 23:32:07 +11:00
|
|
|
skipsdist = True
|
2011-12-30 14:03:15 -08:00
|
|
|
|
|
|
|
[testenv]
|
2012-02-06 13:15:38 +00:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2013-12-03 23:32:07 +11:00
|
|
|
usedevelop = True
|
2015-01-13 17:48:39 -05:00
|
|
|
install_command = pip install -U {opts} {packages}
|
2013-06-11 11:44:40 -07:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2015-01-13 17:39:32 -05:00
|
|
|
commands = lockutils-wrapper python setup.py testr --slowest --testr-args='{posargs}'
|
2014-03-31 22:13:41 +02:00
|
|
|
whitelist_externals = bash
|
2012-06-03 09:54:51 -04:00
|
|
|
|
|
|
|
[tox:jenkins]
|
|
|
|
downloadcache = ~/cache/pip
|
2011-12-30 14:03:15 -08:00
|
|
|
|
|
|
|
[testenv:pep8]
|
2012-11-09 12:56:25 -05:00
|
|
|
commands =
|
2013-12-03 23:32:07 +11:00
|
|
|
flake8 {posargs}
|
2014-03-31 22:13:41 +02:00
|
|
|
# Check that .po and .pot files are valid:
|
|
|
|
bash -c "find glance -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
2011-12-30 14:03:15 -08:00
|
|
|
|
2012-02-06 13:15:38 +00:00
|
|
|
[testenv:cover]
|
2013-12-03 23:32:07 +11:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
commands = python setup.py testr --coverage --testr-args='^(?!.*test.*coverage).*$'
|
2012-02-06 13:15:38 +00:00
|
|
|
|
2012-02-10 23:38:27 -08:00
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
2013-04-20 22:28:31 -07:00
|
|
|
|
2014-03-27 17:39:14 +08:00
|
|
|
[testenv:genconfig]
|
|
|
|
commands =
|
|
|
|
oslo-config-generator --config-file etc/oslo-config-generator/glance-api.conf
|
|
|
|
oslo-config-generator --config-file etc/oslo-config-generator/glance-registry.conf
|
|
|
|
oslo-config-generator --config-file etc/oslo-config-generator/glance-scrubber.conf
|
|
|
|
oslo-config-generator --config-file etc/oslo-config-generator/glance-cache.conf
|
|
|
|
oslo-config-generator --config-file etc/oslo-config-generator/glance-manage.conf
|
|
|
|
|
2014-08-21 21:21:06 +02:00
|
|
|
[testenv:docs]
|
|
|
|
commands = python setup.py build_sphinx
|
|
|
|
|
2013-04-20 22:28:31 -07:00
|
|
|
[flake8]
|
2013-06-09 10:46:50 +02:00
|
|
|
# TODO(dmllr): Analyze or fix the warnings blacklisted below
|
|
|
|
# E711 comparison to None should be 'if cond is not None:'
|
|
|
|
# E712 comparison to True should be 'if cond is True:' or 'if cond:'
|
2014-02-12 15:51:11 +04:00
|
|
|
# H302 import only modules
|
2013-06-09 10:46:50 +02:00
|
|
|
# H402 one line docstring needs punctuation.
|
|
|
|
# H404 multi line docstring should start with a summary
|
2014-06-12 15:36:21 +02:00
|
|
|
# H405 multi line docstring summary not separated with an empty line
|
|
|
|
# H904 Wrap long lines in parentheses instead of a backslash
|
|
|
|
ignore = E711,E712,H302,H402,H404,H405,H904
|
2013-04-20 22:28:31 -07:00
|
|
|
exclude = .venv,.git,.tox,dist,doc,etc,*glance/locale*,*openstack/common*,*lib/python*,*egg,build
|
2014-05-09 12:33:21 +02:00
|
|
|
|
|
|
|
[hacking]
|
|
|
|
local-check-factory = glance.hacking.checks.factory
|