Initial version of tox configuration

This is for test cases only.
This commit is contained in:
tengqm 2014-12-10 16:50:36 +08:00
parent 4717f196b2
commit 22584373c1
1 changed files with 54 additions and 0 deletions

54
tox.ini Normal file
View File

@ -0,0 +1,54 @@
[tox]
envlist = py26,py27,pep8
minversion = 1.6
skipsdist = True
[testenv]
# Note the hash seed is set to 0 until senlin can be tested with a
# random hash seed successfully.
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
usedevelop = True
install_command = pip install {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
python setup.py testr --slowest --testr-args='{posargs}'
whitelist_externals = bash
[testenv:pep8]
commands =
flake8 senlin bin/senlin-api bin/senlin-engine bin/senlin-manage
# Check that .po and .pot files are valid:
bash -c "find senlin -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands =
python setup.py testr --coverage --testr-args='{posargs}'
[testenv:docs]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
sphinxcontrib-httpdomain
commands = python setup.py build_sphinx
[testenv:genconfig]
commands =
bash tools/config/generate_sample.sh -b . -p senlin -o etc/senlin
[flake8]
# H404 multi line docstring should start with a summary
# H803 no full stop at the end of the commit message
ignore = H404,H803
show-source = true
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
# 28 is currently the most complex thing we have
# TODO(asalkeld): get this number down to 20
max-complexity=29
[hacking]
import_exceptions = senlin.common.i18n