2015-06-04 15:26:55 +02:00
|
|
|
[tox]
|
2016-09-21 12:03:50 +02:00
|
|
|
minversion = 1.8
|
2017-02-08 11:09:30 +07:00
|
|
|
envlist = py35,py27,pep8
|
2015-06-04 15:26:55 +02:00
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
usedevelop = True
|
2015-12-17 11:58:16 +01:00
|
|
|
whitelist_externals = find
|
2017-06-05 19:10:28 +08:00
|
|
|
rm
|
2017-01-24 18:12:15 +01:00
|
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
2015-06-04 15:26:55 +02:00
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
2016-09-21 12:03:50 +02:00
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
2015-12-17 11:58:16 +01:00
|
|
|
commands =
|
2017-04-25 12:52:13 +05:30
|
|
|
rm -f .testrepository/times.dbm
|
2016-10-15 00:55:18 -04:00
|
|
|
find . -type f -name "*.py[c|o]" -delete
|
2016-01-07 14:32:06 +01:00
|
|
|
ostestr --concurrency=6 {posargs}
|
2017-06-25 18:36:45 +07:00
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
2015-06-04 15:26:55 +02:00
|
|
|
|
|
|
|
[testenv:pep8]
|
2016-01-22 14:55:21 +01:00
|
|
|
commands =
|
|
|
|
doc8 doc/source/ CONTRIBUTING.rst HACKING.rst README.rst
|
|
|
|
flake8
|
2016-09-16 14:51:42 +02:00
|
|
|
bandit -r watcher -x tests -n5 -ll -s B320
|
2015-06-04 15:26:55 +02:00
|
|
|
|
|
|
|
[testenv:venv]
|
2016-01-15 14:43:22 +01:00
|
|
|
setenv = PYTHONHASHSEED=0
|
2015-06-04 15:26:55 +02:00
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[testenv:cover]
|
2016-12-30 16:37:24 +08:00
|
|
|
commands =
|
|
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
coverage report
|
2015-06-04 15:26:55 +02:00
|
|
|
|
|
|
|
[testenv:docs]
|
2016-01-15 14:43:22 +01:00
|
|
|
setenv = PYTHONHASHSEED=0
|
2016-01-22 14:55:21 +01:00
|
|
|
commands =
|
|
|
|
doc8 doc/source/ CONTRIBUTING.rst HACKING.rst README.rst
|
|
|
|
python setup.py build_sphinx
|
2015-06-04 15:26:55 +02:00
|
|
|
|
|
|
|
[testenv:debug]
|
2016-02-22 23:46:36 +08:00
|
|
|
commands = oslo_debug_helper -t watcher/tests {posargs}
|
2015-06-04 15:26:55 +02:00
|
|
|
|
2017-01-17 18:00:22 +08:00
|
|
|
[testenv:genconfig]
|
2015-06-04 15:26:55 +02:00
|
|
|
sitepackages = False
|
|
|
|
commands =
|
2016-02-05 15:16:50 +01:00
|
|
|
oslo-config-generator --config-file etc/watcher/watcher-config-generator.conf
|
2015-06-04 15:26:55 +02:00
|
|
|
|
|
|
|
[flake8]
|
|
|
|
show-source=True
|
2017-03-22 16:01:23 +08:00
|
|
|
ignore= H105,E123,E226,N320
|
2015-06-04 15:26:55 +02:00
|
|
|
builtins= _
|
2017-06-23 17:25:39 +08:00
|
|
|
enable-extensions = H106,H203
|
2016-06-03 11:50:49 +02:00
|
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,*sqlalchemy/alembic/versions/*,demo/,releasenotes
|
2015-10-22 17:02:45 +02:00
|
|
|
|
|
|
|
[testenv:wheel]
|
|
|
|
commands = python setup.py bdist_wheel
|
2015-12-11 18:02:19 +01:00
|
|
|
|
|
|
|
[hacking]
|
|
|
|
import_exceptions = watcher._i18n
|
2016-07-20 16:05:01 -07:00
|
|
|
local-check-factory = watcher.hacking.checks.factory
|
2016-01-22 14:55:21 +01:00
|
|
|
|
|
|
|
[doc8]
|
|
|
|
extension=.rst
|
|
|
|
# todo: stop ignoring doc/source/man when https://bugs.launchpad.net/doc8/+bug/1502391 is fixed
|
2016-02-03 12:42:22 +01:00
|
|
|
ignore-path=doc/source/image_src,doc/source/man,doc/source/api
|
2016-06-03 11:50:49 +02:00
|
|
|
|
|
|
|
[testenv:releasenotes]
|
|
|
|
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
2016-06-20 18:59:26 -05:00
|
|
|
|
|
|
|
[testenv:bandit]
|
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
2016-09-16 14:51:42 +02:00
|
|
|
commands = bandit -r watcher -x tests -n5 -ll -s B320
|
2017-05-08 14:09:42 +05:30
|
|
|
|
|
|
|
[testenv:install-guide]
|
|
|
|
commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html
|