2013-10-31 21:14:00 +07:00
|
|
|
[tox]
|
2017-02-08 16:09:17 +08:00
|
|
|
envlist = py35,py27,pep8
|
2013-10-31 21:14:00 +07:00
|
|
|
minversion = 1.6
|
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
usedevelop = True
|
2017-12-02 07:23:54 +01:00
|
|
|
install_command = pip install {opts} {packages}
|
2014-06-02 17:17:04 +04:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2015-01-09 18:36:59 -08:00
|
|
|
PYTHONDONTWRITEBYTECODE = 1
|
2016-10-26 13:09:18 +05:30
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
2015-12-08 10:51:37 +09:00
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
2017-12-02 07:23:54 +01:00
|
|
|
deps =
|
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|
2014-06-02 17:17:04 +04:00
|
|
|
commands =
|
2017-07-09 16:42:24 +03:00
|
|
|
rm -f .testrepository/times.dbm
|
2015-12-07 17:59:45 +09:00
|
|
|
find . -type f -name "*.pyc" -delete
|
2015-09-09 12:23:43 +03:00
|
|
|
python setup.py testr --slowest --testr-args='{posargs}'
|
2015-12-07 17:59:45 +09:00
|
|
|
whitelist_externals =
|
|
|
|
rm
|
|
|
|
find
|
2013-10-31 21:14:00 +07:00
|
|
|
|
2015-07-23 12:13:52 +03:00
|
|
|
[testenv:unit-postgresql]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2015-08-06 16:22:33 +03:00
|
|
|
passenv = ZUUL_PROJECT
|
2017-02-02 17:01:48 +01:00
|
|
|
commands = ./run_tests.sh -N --db-type postgresql
|
2015-07-23 12:13:52 +03:00
|
|
|
|
2016-11-25 18:46:13 +05:30
|
|
|
[testenv:unit-mysql]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
passenv = ZUUL_PROJECT
|
2017-02-02 17:01:48 +01:00
|
|
|
commands = ./run_tests.sh -N --db-type mysql
|
2016-11-25 18:46:13 +05:30
|
|
|
|
2013-10-31 21:14:00 +07:00
|
|
|
[testenv:pep8]
|
2017-04-26 17:26:12 +01:00
|
|
|
basepython = python2.7
|
2017-04-01 17:08:38 +08:00
|
|
|
commands =
|
2017-12-02 07:23:54 +01:00
|
|
|
doc8 doc/source
|
2017-04-01 17:08:38 +08:00
|
|
|
flake8 {posargs} . {toxinidir}/tools/get_action_list.py {toxinidir}/tools/sync_db.py
|
2013-10-31 21:14:00 +07:00
|
|
|
|
2014-06-02 17:17:04 +04:00
|
|
|
[testenv:cover]
|
|
|
|
# Also do not run test_coverage_ext tests while gathering coverage as those
|
|
|
|
# tests conflict with coverage.
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
commands =
|
2017-01-06 21:11:43 +05:30
|
|
|
{toxinidir}/tools/cover.sh {posargs}
|
2014-06-02 17:17:04 +04:00
|
|
|
|
2015-05-26 12:53:32 +03:00
|
|
|
[testenv:genconfig]
|
|
|
|
commands =
|
|
|
|
oslo-config-generator --config-file tools/config/config-generator.mistral.conf \
|
2016-12-18 21:40:54 -05:00
|
|
|
--output-file etc/mistral.conf.sample
|
2015-05-26 12:53:32 +03:00
|
|
|
|
2017-10-04 09:06:35 +07:00
|
|
|
[testenv:genpolicy]
|
|
|
|
commands =
|
|
|
|
oslopolicy-sample-generator --config-file tools/config/policy-generator.mistral.conf \
|
|
|
|
--output-file etc/policy.yaml.sample
|
|
|
|
|
2016-03-23 13:03:16 +06:00
|
|
|
#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
|
2013-10-31 21:14:00 +07:00
|
|
|
[testenv:venv]
|
2017-04-11 16:11:39 +01:00
|
|
|
basepython = python2.7
|
2016-03-23 13:03:16 +06:00
|
|
|
setenv = PYTHONHASHSEED=0
|
2013-10-31 21:14:00 +07:00
|
|
|
commands = {posargs}
|
|
|
|
|
2016-03-17 12:12:01 -05:00
|
|
|
#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
|
2013-10-31 21:14:00 +07:00
|
|
|
[testenv:docs]
|
2017-02-17 13:20:54 +00:00
|
|
|
basepython = python2.7
|
2016-03-17 12:12:01 -05:00
|
|
|
setenv = PYTHONHASHSEED=0
|
2017-08-09 16:48:14 +08:00
|
|
|
commands =
|
2017-08-22 16:13:13 +08:00
|
|
|
rm -rf doc/build
|
2017-12-02 07:23:54 +01:00
|
|
|
sphinx-build -b html doc/source doc/build/html
|
2013-10-31 21:14:00 +07:00
|
|
|
|
2015-11-09 21:47:38 +08:00
|
|
|
[testenv:releasenotes]
|
2017-08-22 16:13:13 +08:00
|
|
|
commands =
|
|
|
|
rm -rf releasenotes/build
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
2015-11-09 21:47:38 +08:00
|
|
|
|
2017-01-11 18:19:39 +05:30
|
|
|
[testenv:api-ref]
|
|
|
|
# This environment is called from CI scripts to test and publish
|
|
|
|
# the API Ref to developer.openstack.org.
|
|
|
|
commands =
|
|
|
|
rm -rf api-ref/build
|
|
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
whitelist_externals = rm
|
|
|
|
|
2015-12-09 15:32:26 +09:00
|
|
|
#Skip PEP257 violation.
|
2013-10-31 21:14:00 +07:00
|
|
|
[flake8]
|
2015-12-09 15:32:26 +09:00
|
|
|
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401
|
2013-10-31 21:14:00 +07:00
|
|
|
show-source = true
|
|
|
|
builtins = _
|
2017-07-15 12:50:29 +08:00
|
|
|
# [H106] Don't put vim configuration in source files.
|
|
|
|
# [H203] Use assertIs(Not)None to check for None.
|
2017-07-27 22:15:12 +08:00
|
|
|
# [H904] Delay string interpolations at logging calls.
|
|
|
|
enable-extensions = H106,H203,H904
|
2016-10-09 03:11:46 +05:30
|
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,scripts
|
2015-07-11 20:39:59 +00:00
|
|
|
|
2017-08-09 16:48:14 +08:00
|
|
|
[doc8]
|
|
|
|
extensions = .rst, .yaml
|
|
|
|
# Maximal line length should be 80.
|
|
|
|
max-line-length = 80
|
|
|
|
|
2015-07-11 20:39:59 +00:00
|
|
|
[hacking]
|
2015-07-16 10:48:06 +08:00
|
|
|
local-check-factory = mistral.hacking.checks.factory
|
2016-11-28 17:09:19 +05:30
|
|
|
import_exceptions = mistral._i18n
|