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
|
2018-10-04 09:24:18 -04:00
|
|
|
envlist = py3,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
|
2018-10-09 10:12:57 +07:00
|
|
|
stestr run {posargs}
|
2018-05-09 10:34:32 +08:00
|
|
|
stestr slowest
|
2014-07-16 13:23:05 +03:00
|
|
|
|
2015-11-09 07:56:52 +01:00
|
|
|
[testenv:releasenotes]
|
2018-06-06 16:06:01 -04:00
|
|
|
basepython = python3
|
2018-01-17 09:43:25 +08: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
|
2017-06-01 17:18:42 -04:00
|
|
|
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
|
2018-01-17 09:43:25 +08:00
|
|
|
whitelist_externals = rm
|
2015-11-09 07:56:52 +01:00
|
|
|
|
2016-01-10 00:38:07 +08:00
|
|
|
[testenv:debug]
|
2018-06-06 16:06:01 -04:00
|
|
|
basepython = python3
|
2016-01-10 00:38:07 +08:00
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
|
|
|
[testenv:debug-py27]
|
|
|
|
basepython = python2.7
|
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
2018-10-04 09:24:18 -04:00
|
|
|
[testenv:debug-py3]
|
|
|
|
basepython = python3
|
2017-01-05 18:28:01 -05:00
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
2013-08-08 10:34:06 -04:00
|
|
|
[testenv:pep8]
|
2018-04-07 09:20:15 -04:00
|
|
|
# Let's gate pep8 under py3 by default because the py3 checks are stricter.
|
|
|
|
basepython = python3
|
2013-08-08 10:34:06 -04:00
|
|
|
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 \
|
2019-02-19 20:26:45 -08:00
|
|
|
tools/check_logging.sh \
|
|
|
|
tools/coding-checks.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]
|
2018-06-06 16:06:01 -04:00
|
|
|
basepython = python3
|
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]
|
2018-06-06 16:06:01 -04:00
|
|
|
basepython = python3
|
2017-09-25 18:41:24 +08:00
|
|
|
commands = oslopolicy-sample-generator --config-file=etc/manila/manila-policy-generator.conf
|
|
|
|
|
2013-08-08 10:34:06 -04:00
|
|
|
[testenv:venv]
|
2018-06-06 16:06:01 -04:00
|
|
|
basepython = python3
|
2013-08-08 10:34:06 -04:00
|
|
|
commands = {posargs}
|
|
|
|
|
2014-08-21 17:03:06 +02:00
|
|
|
[testenv:docs]
|
2018-06-06 16:06:01 -04:00
|
|
|
basepython = python3
|
2018-01-17 09:43:25 +08: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
|
2017-02-15 07:07:42 +01:00
|
|
|
commands =
|
2017-03-03 09:38:22 -05:00
|
|
|
rm -rf doc/build
|
2018-05-04 00:00:00 +08:00
|
|
|
sphinx-build -W -b html doc/source doc/build/html
|
2017-04-13 06:36:24 -04:00
|
|
|
# Ignore D001 since we allow lines in excess of 79 characters.
|
2019-02-19 23:20:26 +05:30
|
|
|
doc8 --ignore D001 --ignore-path .tox --ignore-path doc/build --ignore-path manila.egg-info -e .txt -e .rst -e .inc
|
2018-01-17 09:43:25 +08:00
|
|
|
whitelist_externals = rm
|
2014-08-21 17:03:06 +02:00
|
|
|
|
2019-06-24 14:39:22 -07: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, and develop mode disabled
|
|
|
|
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
|
|
|
# further relies on "tox.skipsdist = True" above).
|
|
|
|
basepython = python3
|
|
|
|
deps = bindep
|
|
|
|
commands = bindep test
|
|
|
|
usedevelop = False
|
|
|
|
|
2013-08-08 10:34:06 -04:00
|
|
|
[testenv:cover]
|
2018-06-06 16:06:01 -04:00
|
|
|
basepython = python3
|
2018-01-14 13:18:36 +08:00
|
|
|
setenv =
|
|
|
|
{[testenv]setenv}
|
|
|
|
PYTHON=coverage run --source manila --parallel-mode
|
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/cover.sh {posargs}
|
2013-08-08 10:34:06 -04:00
|
|
|
|
2016-02-21 09:14:13 -05:00
|
|
|
[testenv:fast8]
|
2018-04-07 09:20:15 -04:00
|
|
|
# Let's run fast8 under py3 by default because the py3 checks are stricter.
|
|
|
|
basepython = python3
|
2016-02-21 09:14:13 -05:00
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/fast8.sh
|
|
|
|
|
2013-08-08 10:34:06 -04:00
|
|
|
[testenv:pylint]
|
2018-06-06 13:54:18 -05:00
|
|
|
basepython = python3
|
2013-09-30 10:48:26 -04:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
2019-01-24 07:38:45 -05:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
2019-03-05 15:30:22 -08:00
|
|
|
pylint==2.3.1
|
2014-10-21 09:37:15 +02:00
|
|
|
whitelist_externals = bash
|
2018-10-11 15:08:16 -04:00
|
|
|
commands = bash ./tools/coding-checks.sh --pylint {posargs}
|
2013-08-08 10:34:06 -04:00
|
|
|
|
2016-05-07 17:18:15 +02:00
|
|
|
[testenv:api-ref]
|
2018-06-06 16:06:01 -04:00
|
|
|
basepython = python3
|
2016-05-07 17:18:15 +02:00
|
|
|
# This environment is called from CI scripts to test and publish
|
2019-07-22 19:03:32 +02:00
|
|
|
# the API Ref to docs.openstack.org.
|
2016-05-07 17:18:15 +02:00
|
|
|
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]
|
2018-06-06 16:06:01 -04:00
|
|
|
basepython = python3
|
2016-06-22 13:24:35 +02:00
|
|
|
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:
|
2019-03-08 12:19:11 -08: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
|
2018-03-22 15:14:44 -04:00
|
|
|
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|