2013-05-02 14:50:57 -04:00
|
|
|
[tox]
|
2013-09-30 22:55:00 +08:00
|
|
|
minversion = 1.6
|
|
|
|
skipsdist = True
|
2013-05-02 14:50:57 -04:00
|
|
|
envlist = py26,py27,pep8
|
|
|
|
|
|
|
|
[testenv]
|
2013-09-30 22:55:00 +08:00
|
|
|
usedevelop = True
|
2013-12-11 08:55:12 -08:00
|
|
|
install_command = pip install -U {opts} {packages}
|
2013-05-02 14:50:57 -04:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2014-09-12 12:04:50 +01:00
|
|
|
PYTHONDONTWRITEBYTECODE = 1
|
2013-05-02 14:50:57 -04:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2014-03-31 20:42:46 +02:00
|
|
|
whitelist_externals = bash
|
2014-03-30 16:14:16 -07:00
|
|
|
commands =
|
|
|
|
bash -c "TESTS_DIR=./ironic/tests/ python setup.py testr --slowest --testr-args='{posargs}'"
|
2014-03-31 20:42:46 +02:00
|
|
|
|
2013-05-02 14:50:57 -04:00
|
|
|
[tox:jenkins]
|
|
|
|
downloadcache = ~/cache/pip
|
|
|
|
|
|
|
|
[testenv:pep8]
|
|
|
|
commands =
|
2013-07-22 16:07:06 -07:00
|
|
|
flake8 {posargs}
|
2014-03-31 20:42:46 +02:00
|
|
|
# Check that .po and .pot files are valid:
|
2014-04-03 20:25:43 +02:00
|
|
|
bash -c "find ironic -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
2013-05-02 14:50:57 -04:00
|
|
|
|
|
|
|
[testenv:cover]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
commands =
|
|
|
|
python setup.py testr --coverage {posargs}
|
|
|
|
|
2014-09-29 15:59:36 -07:00
|
|
|
[testenv:checkconfig]
|
|
|
|
sitepackages = False
|
|
|
|
envdir = {toxworkdir}/venv
|
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/config/check_uptodate.sh
|
|
|
|
|
2014-06-20 13:53:17 -04:00
|
|
|
[testenv:genconfig]
|
2014-09-29 15:59:36 -07:00
|
|
|
sitepackages = False
|
|
|
|
envdir = {toxworkdir}/venv
|
2014-06-20 13:53:17 -04:00
|
|
|
commands =
|
|
|
|
bash tools/config/generate_sample.sh -b . -p ironic -o etc/ironic
|
|
|
|
|
2013-05-02 14:50:57 -04:00
|
|
|
[testenv:venv]
|
2014-08-25 12:48:10 -07:00
|
|
|
setenv = PYTHONHASHSEED=0
|
2013-05-02 14:50:57 -04:00
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[flake8]
|
2013-10-17 11:25:11 -07:00
|
|
|
# E711: ignored because it is normal to use "column == None" in sqlalchemy
|
2014-10-09 21:23:37 +03:00
|
|
|
# TODO(yuriyz): Analyze or fix the warnings blacklisted below
|
|
|
|
ignore = E12,E111,E113,E131,E265,E711,F812,H305,H307,H405,H702,H904
|
2014-03-30 16:14:16 -07:00
|
|
|
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,*ironic/nova*
|
2013-11-19 08:15:25 +08:00
|
|
|
|
|
|
|
[hacking]
|
2014-09-11 21:04:47 +00:00
|
|
|
import_exceptions = testtools.matchers, ironic.common.i18n
|