2013-08-08 10:34:06 -04:00
|
|
|
[tox]
|
2016-07-10 11:50:33 -04:00
|
|
|
minversion = 2.0
|
2014-07-16 13:23:05 +03:00
|
|
|
skipsdist = True
|
2017-02-07 13:28:28 +07:00
|
|
|
envlist = py35,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
|
2016-06-25 20:00:25 -05:00
|
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
2015-11-26 10:58:03 +09:00
|
|
|
whitelist_externals = find
|
2013-09-30 10:48:26 -04:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2015-11-26 10:58:03 +09:00
|
|
|
commands =
|
2016-09-16 13:56:38 +05:30
|
|
|
find . -type f -name "*.py[c|o]" -delete
|
2016-02-18 23:18:44 +08:00
|
|
|
ostestr {posargs}
|
2014-07-16 13:23:05 +03:00
|
|
|
|
2015-11-09 07:56:52 +01:00
|
|
|
[testenv:releasenotes]
|
2017-06-01 17:18:42 -04:00
|
|
|
whitelist_externals = rm
|
|
|
|
commands =
|
|
|
|
rm -rf releasenotes/build
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees \
|
2015-11-09 07:56:52 +01:00
|
|
|
-b html releasenotes/source releasenotes/build/html
|
|
|
|
|
2016-01-10 00:38:07 +08:00
|
|
|
[testenv:debug]
|
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
|
|
|
[testenv:debug-py27]
|
|
|
|
basepython = python2.7
|
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
2017-01-05 18:28:01 -05:00
|
|
|
[testenv:debug-py35]
|
|
|
|
basepython = python3.5
|
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
2013-08-08 10:34:06 -04:00
|
|
|
[testenv:pep8]
|
|
|
|
commands =
|
2014-10-19 18:56:02 +02:00
|
|
|
flake8 {posargs}
|
2015-01-13 17:33:09 +01:00
|
|
|
# Run bashate during pep8 runs to ensure violations are caught by
|
|
|
|
# the check and gate queues.
|
2016-05-23 14:52:28 -04:00
|
|
|
bashate -i E006,E042,E043 \
|
2016-02-21 10:18:58 -05:00
|
|
|
tools/enable-pre-commit-hook.sh \
|
2015-01-13 17:33:09 +01:00
|
|
|
contrib/ci/pre_test_hook.sh \
|
|
|
|
contrib/ci/post_test_hook.sh \
|
|
|
|
devstack/plugin.sh \
|
2016-04-07 16:41:59 +03:00
|
|
|
devstack/upgrade/from-mitaka/upgrade-manila \
|
|
|
|
devstack/upgrade/resources.sh \
|
|
|
|
devstack/upgrade/shutdown.sh \
|
|
|
|
devstack/upgrade/upgrade.sh \
|
2015-07-23 14:34:28 +03:00
|
|
|
tools/cover.sh \
|
2016-04-04 07:01:28 -04:00
|
|
|
tools/check_logging.sh \
|
2015-01-13 17:33:09 +01:00
|
|
|
run_tests.sh
|
2016-04-04 14:14:07 -04:00
|
|
|
{toxinidir}/tools/check_exec.py {toxinidir}/manila
|
2016-04-04 07:01:28 -04:00
|
|
|
{toxinidir}/tools/check_logging.sh {toxinidir}/manila
|
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
|
|
|
|
2017-09-25 18:41:24 +08:00
|
|
|
[testenv:genpolicy]
|
|
|
|
commands = oslopolicy-sample-generator --config-file=etc/manila/manila-policy-generator.conf
|
|
|
|
|
2013-08-08 10:34:06 -04:00
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
2014-08-21 17:03:06 +02:00
|
|
|
[testenv:docs]
|
2017-03-03 09:38:22 -05:00
|
|
|
whitelist_externals = rm
|
2017-02-15 07:07:42 +01:00
|
|
|
commands =
|
2017-03-03 09:38:22 -05:00
|
|
|
rm -rf doc/build
|
2017-02-15 07:07:42 +01:00
|
|
|
python setup.py build_sphinx
|
2017-04-13 06:36:24 -04:00
|
|
|
# Ignore D001 since we allow lines in excess of 79 characters.
|
2017-02-15 07:07:42 +01:00
|
|
|
doc8 --ignore D001 --ignore-path .tox --ignore-path doc/build --ignore-path manila.egg-info -e txt -e rst
|
2014-08-21 17:03:06 +02:00
|
|
|
|
2013-08-08 10:34:06 -04:00
|
|
|
[testenv:cover]
|
2015-07-23 14:34:28 +03:00
|
|
|
commands = {toxinidir}/tools/cover.sh {posargs}
|
2013-08-08 10:34:06 -04:00
|
|
|
|
2016-02-21 09:14:13 -05:00
|
|
|
[testenv:fast8]
|
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/fast8.sh
|
|
|
|
|
2013-08-08 10:34:06 -04:00
|
|
|
[testenv:pylint]
|
2017-03-17 12:02:21 -04:00
|
|
|
basepython = python2.7
|
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
|
|
|
|
|
2015-04-03 11:21:40 -04:00
|
|
|
[testenv:lint]
|
2017-03-17 12:02:21 -04:00
|
|
|
basepython = python2.7
|
2015-04-03 11:21:40 -04:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
pylint==0.26.0
|
|
|
|
commands = python tools/lintstack.py check
|
|
|
|
|
2016-05-07 17:18:15 +02:00
|
|
|
[testenv:api-ref]
|
|
|
|
# This environment is called from CI scripts to test and publish
|
|
|
|
# the API Ref to developer.openstack.org.
|
|
|
|
whitelist_externals = rm
|
|
|
|
commands =
|
|
|
|
rm -rf api-ref/build
|
|
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
|
2016-06-22 13:24:35 +02:00
|
|
|
[testenv:dbrevision]
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
commands = alembic -c manila/db/migrations/alembic.ini revision -m ""{posargs}
|
|
|
|
|
2013-08-08 10:34:06 -04:00
|
|
|
[flake8]
|
2014-08-20 10:11:40 +02:00
|
|
|
# Following checks are ignored on purpose:
|
2016-02-14 14:55:46 +02:00
|
|
|
ignore =
|
2013-08-08 10:34:06 -04:00
|
|
|
builtins = _
|
2017-07-18 18:12:37 +08:00
|
|
|
# [H106] Don't put vim configuration in source files.
|
|
|
|
# [H203] Use assertIs(Not)None to check for None.
|
|
|
|
# [H904] Use ',' instead of '%', String interpolation should be delayed to be handled by the logging code,
|
|
|
|
# rather than being done at the point of the logging call..
|
|
|
|
enable-extensions = H106,H203,H904
|
2016-05-16 20:36:48 -04:00
|
|
|
exclude = .git,.tox,.testrepository,.venv,build,cover,dist,doc,*egg,api-ref/build,*/source/conf.py
|
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
|