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}
|
|
|
|
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}'"
|
|
|
|
bash -c "TESTS_DIR=./ironic/nova/tests/ python setup.py testr --slowest --testr-args='{posargs}'"
|
|
|
|
bash -c "cat .testrepository/1 >>.testrepository/0"
|
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}
|
2013-12-23 16:36:00 -08:00
|
|
|
{toxinidir}/tools/config/check_uptodate.sh
|
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}
|
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[flake8]
|
2013-10-17 11:25:11 -07:00
|
|
|
# E711: ignored because it is normal to use "column == None" in sqlalchemy
|
|
|
|
|
|
|
|
ignore = E12,E711
|
2014-06-03 08:22:57 +02:00
|
|
|
select = E713
|
2013-05-02 14:50:57 -04:00
|
|
|
builtins = _
|
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]
|
2013-11-18 19:33:49 +00:00
|
|
|
import_exceptions = ironic.openstack.common.gettextutils._,testtools.matchers
|