fcf517d72c
Update the incubator code to use different domains for log messages at different levels. Update the import exceptions setting for hacking to allow multiple functions to be imported from gettextutils on one line. bp log-messages-translation-domain Change-Id: I6ce0f4a59438612ce74c46b3ee9398bef24c0c19
65 lines
2.2 KiB
INI
65 lines
2.2 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py26,py27,py33,pep8,pylint
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
sitepackages = False
|
|
usedevelop = True
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
# Use the lockutils wrapper to ensure that external locking works correctly
|
|
# NOTE(bnemec): Due to dependencies between tests in the rpc module, those
|
|
# tests cannot currently be run in parallel. Because that module is
|
|
# deprecated, spending a lot of time fixing them would not be useful.
|
|
# Since we want to test everything else in parallel, however, we need
|
|
# to do two test runs: one in parallel with everything but rpc, and one
|
|
# serialized for the rpc module.
|
|
python -m openstack.common.lockutils python setup.py test --slowest --testr-args='(?!tests.unit.rpc)tests {posargs}'
|
|
python -m openstack.common.lockutils python setup.py test --slowest --testr-args='tests.unit.rpc --concurrency=1 {posargs}'
|
|
{toxinidir}/tools/config/generate_sample.sh -p openstack
|
|
|
|
# As long as we are filtering tests based on whether they run in parallel or
|
|
# not, it will not be possible to specify tests for tox to run by using the
|
|
# normal "tox -e py27 -- test_name". The "all" target allows that behavior
|
|
# to be used again: tox -e all -- test_name
|
|
[testenv:all]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
commands = python -m openstack.common.lockutils python setup.py test --slowest --testr-args='{posargs}'
|
|
|
|
[flake8]
|
|
show-source = True
|
|
ignore = H803
|
|
exclude = .venv,.tox,dist,doc,*.egg,.update-venv
|
|
|
|
[testenv:pep8]
|
|
commands = flake8 {posargs}
|
|
python ./tools/check_maintainers.py
|
|
|
|
[testenv:pylint]
|
|
deps = pylint>=0.26.0
|
|
commands = python ./tools/lint.py ./openstack
|
|
python ./tools/lint.py ./tests
|
|
|
|
[testenv:cover]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
commands =
|
|
# due to dependencies between tests (bug 1192207) we use `--concurrency=1` option
|
|
# Use the lockutils wrapper to ensure that external locking works correctly
|
|
python -m openstack.common.lockutils python setup.py test --coverage --testr-args='--concurrency=1 {posargs}'
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:pyflakes]
|
|
commands = flake8
|
|
|
|
|
|
[hacking]
|
|
import_exceptions =
|
|
openstack.common.gettextutils
|
|
|