2013-05-02 14:50:57 -04:00
|
|
|
[tox]
|
2015-09-04 11:57:16 -07:00
|
|
|
minversion = 1.8
|
2013-09-30 22:55:00 +08:00
|
|
|
skipsdist = True
|
2015-08-26 12:58:56 -03:00
|
|
|
envlist = py34,py27,pep8
|
2013-05-02 14:50:57 -04:00
|
|
|
|
|
|
|
[testenv]
|
2013-09-30 22:55:00 +08:00
|
|
|
usedevelop = True
|
2015-09-04 11:57:16 -07:00
|
|
|
install_command =
|
|
|
|
constraints: pip install -U --force-reinstall -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
|
|
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
|
2015-03-13 08:42:51 -07:00
|
|
|
LANGUAGE=en_US
|
2015-07-15 18:31:29 -07:00
|
|
|
deps = -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}'"
|
2015-06-15 09:59:20 +09:00
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
2014-03-31 20:42:46 +02:00
|
|
|
|
2013-05-02 14:50:57 -04:00
|
|
|
[tox:jenkins]
|
|
|
|
downloadcache = ~/cache/pip
|
|
|
|
|
2015-04-27 11:00:29 -07:00
|
|
|
[testenv:genstates]
|
|
|
|
deps = {[testenv]deps}
|
|
|
|
pydot2
|
2015-06-03 16:56:08 -07:00
|
|
|
commands = {toxinidir}/tools/states_to_dot.py -f {toxinidir}/doc/source/images/states.svg --format svg
|
2015-04-27 11:00:29 -07:00
|
|
|
|
2013-05-02 14:50:57 -04:00
|
|
|
[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}
|
2015-03-13 08:42:51 -07:00
|
|
|
LANGUAGE=en_US
|
2013-05-02 14:50:57 -04:00
|
|
|
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
|
|
|
|
|
2015-05-20 16:36:35 +02:00
|
|
|
[testenv:docs]
|
2015-04-07 13:32:53 -07:00
|
|
|
setenv = PYTHONHASHSEED=0
|
2014-11-14 17:14:19 +00:00
|
|
|
sitepackages = False
|
|
|
|
envdir = {toxworkdir}/venv
|
|
|
|
commands =
|
|
|
|
python setup.py build_sphinx
|
|
|
|
|
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]
|
2015-08-13 16:26:45 +01:00
|
|
|
ignore = E129
|
2015-06-12 11:44:28 -07:00
|
|
|
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
2014-10-16 22:27:32 -07:00
|
|
|
max-complexity=17
|
2013-11-19 08:15:25 +08:00
|
|
|
|
|
|
|
[hacking]
|
2014-09-11 21:04:47 +00:00
|
|
|
import_exceptions = testtools.matchers, ironic.common.i18n
|