2013-10-31 21:14:00 +07:00
|
|
|
[tox]
|
2016-07-14 08:35:27 +08:00
|
|
|
envlist = py35,py34,py27,pep8
|
2013-10-31 21:14:00 +07:00
|
|
|
minversion = 1.6
|
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
usedevelop = True
|
2016-09-27 09:50:50 +00:00
|
|
|
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
2014-06-02 17:17:04 +04:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2015-01-09 18:36:59 -08:00
|
|
|
PYTHONDONTWRITEBYTECODE = 1
|
2015-12-08 10:51:37 +09:00
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
2015-07-16 11:25:30 +06:00
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
2014-06-02 17:17:04 +04:00
|
|
|
commands =
|
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
|
2015-07-23 12:13:52 +03:00
|
|
|
commands = ./run_tests.sh -V --db-type postgresql
|
|
|
|
|
2013-10-31 21:14:00 +07:00
|
|
|
[testenv:pep8]
|
2015-12-01 15:11:42 -05:00
|
|
|
commands = 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 =
|
|
|
|
python setup.py testr --coverage \
|
|
|
|
--testr-args='^(?!.*test.*coverage).*$'
|
|
|
|
|
2015-05-26 12:53:32 +03:00
|
|
|
[testenv:genconfig]
|
|
|
|
commands =
|
|
|
|
oslo-config-generator --config-file tools/config/config-generator.mistral.conf \
|
|
|
|
--output-file etc/mistral.conf.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]
|
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]
|
2016-03-17 12:12:01 -05:00
|
|
|
setenv = PYTHONHASHSEED=0
|
2015-08-20 22:05:39 +08:00
|
|
|
commands = python setup.py build_sphinx
|
2013-10-31 21:14:00 +07:00
|
|
|
|
|
|
|
[testenv:pylint]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
commands = bash tools/lintstack.sh
|
|
|
|
|
2015-11-09 21:47:38 +08:00
|
|
|
[testenv:releasenotes]
|
2015-11-27 18:15:51 +08:00
|
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
2015-11-09 21:47:38 +08:00
|
|
|
|
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 = _
|
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
|
|
|
|
|
|
|
[hacking]
|
2015-07-16 10:48:06 +08:00
|
|
|
local-check-factory = mistral.hacking.checks.factory
|