3cc4776b5c
In order to support running unit tests on RHEL 6.x we need to patch eventlet with contrib/redhat-eventlet.patch. We already have support for this in the tools/install_venv_common.py but we need to make a couple changes to allow tox to consume this: 1) Sync in the latest intall_venv_common.py from oslo. This changes patch to use the -N option (ignore already applied patches) and makes it safe to call the patching function more than once. 2) Add a new patch_tox_venv.py script in tools. 3) Update tox.ini to call patch_tox_venv.py before it runs tests and coverage. NOTE: This will hopefully go away eventually once this patch lands: https://bitbucket.org/eventlet/eventlet/issue/89/add-a-timeout-argument-to-subprocesspopen#comment-3342969 Change-Id: I3e2b07c3f718e4aede5c5f231ff0cdb7721ec885
40 lines
1.1 KiB
INI
40 lines
1.1 KiB
INI
[tox]
|
|
envlist = py26,py27,pep8
|
|
|
|
[testenv]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
NOSE_WITH_OPENSTACK=1
|
|
NOSE_OPENSTACK_COLOR=1
|
|
NOSE_OPENSTACK_RED=0.05
|
|
NOSE_OPENSTACK_YELLOW=0.025
|
|
NOSE_OPENSTACK_SHOW_ELAPSED=1
|
|
NOSE_OPENSTACK_STDOUT=1
|
|
deps = -r{toxinidir}/tools/pip-requires
|
|
-r{toxinidir}/tools/test-requires
|
|
setuptools_git>=0.4
|
|
commands =
|
|
python tools/patch_tox_venv.py
|
|
nosetests {posargs}
|
|
|
|
[tox:jenkins]
|
|
sitepackages = True
|
|
downloadcache = ~/cache/pip
|
|
|
|
[testenv:pep8]
|
|
# E711/E712 comparison to False should be 'if cond is False:' or 'if not cond:'
|
|
# query = query.filter(Component.disabled == False)
|
|
# E125 continuation line does not distinguish itself from next logical line
|
|
|
|
commands =
|
|
pep8 --repeat --show-source --ignore=E125,E711,E712 --exclude=.venv,.tox,dist,doc,openstack,*egg .
|
|
pep8 --repeat --show-source --ignore=E125 --filename=quantum* bin
|
|
|
|
[testenv:i18n]
|
|
commands = python ./tools/check_i18n.py ./quantum ./tools/i18n_cfg.py
|
|
|
|
[testenv:cover]
|
|
setenv = NOSE_WITH_COVERAGE=1
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|