2013-08-08 10:34:06 -04:00
|
|
|
[tox]
|
2014-07-16 13:23:05 +03:00
|
|
|
minversion = 1.6
|
|
|
|
skipsdist = True
|
2015-02-25 14:50:17 +02:00
|
|
|
envlist = py27,pep8
|
2013-08-08 10:34:06 -04:00
|
|
|
|
|
|
|
[testenv]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2014-07-16 13:23:05 +03:00
|
|
|
usedevelop = True
|
|
|
|
install_command = pip install {opts} {packages}
|
2013-09-30 10:48:26 -04:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2014-07-16 13:23:05 +03:00
|
|
|
commands = python setup.py testr --testr-args='{posargs}'
|
|
|
|
|
|
|
|
[tox:jenkins]
|
|
|
|
downloadcache = ~/cache/pip
|
2013-08-08 10:34:06 -04:00
|
|
|
|
|
|
|
[testenv:pep8]
|
|
|
|
commands =
|
2014-10-19 18:56:02 +02:00
|
|
|
flake8 {posargs}
|
2013-09-17 10:57:47 +03:00
|
|
|
flake8 --filename=manila* bin
|
2015-01-13 17:33:09 +01:00
|
|
|
# Run bashate during pep8 runs to ensure violations are caught by
|
|
|
|
# the check and gate queues.
|
|
|
|
bashate tools/enable-pre-commit-hook.sh \
|
|
|
|
contrib/ci/pre_test_hook.sh \
|
|
|
|
contrib/ci/post_test_hook.sh \
|
|
|
|
contrib/ci/multi_backend/pre_test_hook.sh \
|
|
|
|
contrib/ci/multi_backend/post_test_hook.sh \
|
|
|
|
devstack/plugin.sh \
|
|
|
|
run_tests.sh
|
2013-08-08 10:34:06 -04:00
|
|
|
|
2014-04-29 14:11:52 +03:00
|
|
|
[testenv:genconfig]
|
2014-10-21 09:37:15 +02:00
|
|
|
whitelist_externals = bash
|
2014-04-29 14:11:52 +03:00
|
|
|
commands =
|
2014-10-16 21:03:03 +02:00
|
|
|
oslo-config-generator --config-file etc/oslo-config-generator/manila.conf
|
2014-04-29 14:11:52 +03:00
|
|
|
|
2013-08-08 10:34:06 -04:00
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
2014-08-21 17:03:06 +02:00
|
|
|
[testenv:docs]
|
|
|
|
commands = python setup.py build_sphinx
|
|
|
|
|
2013-08-08 10:34:06 -04:00
|
|
|
[testenv:cover]
|
2014-07-16 13:23:05 +03:00
|
|
|
commands =
|
|
|
|
python setup.py testr --coverage \
|
|
|
|
--testr-args='^(?!.*test.*coverage).*$'
|
2013-08-08 10:34:06 -04:00
|
|
|
|
|
|
|
[testenv:pylint]
|
2013-09-30 10:48:26 -04:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
2013-08-08 10:34:06 -04:00
|
|
|
pylint==0.26.0
|
2014-10-21 09:37:15 +02:00
|
|
|
whitelist_externals = bash
|
2013-08-08 10:34:06 -04:00
|
|
|
commands = bash tools/lintstack.sh
|
|
|
|
|
|
|
|
[flake8]
|
2014-08-20 10:11:40 +02:00
|
|
|
# Following checks are ignored on purpose:
|
|
|
|
#
|
|
|
|
# H904 wrap long lines in parentheses instead of a backslash
|
|
|
|
# reason: removed in hacking (https://review.openstack.org/#/c/101701/)
|
2014-08-26 19:46:55 +02:00
|
|
|
ignore = H904
|
2013-08-08 10:34:06 -04:00
|
|
|
builtins = _
|
|
|
|
exclude = .venv,.tox,dist,doc,openstack,*egg
|
2014-10-16 21:36:13 +02:00
|
|
|
|
|
|
|
[hacking]
|
|
|
|
import_exceptions =
|
|
|
|
manila.i18n
|
2014-10-17 20:55:03 +02:00
|
|
|
local-check-factory = manila.hacking.checks.factory
|