cb904d0d4c
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
38 lines
933 B
INI
38 lines
933 B
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
|
|
LANG=en_US.UTF-8
|
|
LANGUAGE=en_US:en
|
|
LC_ALL=C
|
|
|
|
deps = -r{toxinidir}/tools/pip-requires
|
|
-r{toxinidir}/tools/test-requires
|
|
commands =
|
|
python tools/patch_tox_venv.py
|
|
nosetests {posargs}
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
python tools/hacking.py --ignore=N4,E125,E126,E711,E712 --repeat --show-source \
|
|
--exclude=.venv,.tox,dist,doc,openstack,*egg .
|
|
python tools/hacking.py --ignore=N4,E125,E126,E711,E712 --repeat --show-source \
|
|
--filename=cinder* bin
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
setenv = NOSE_WITH_COVERAGE=1
|
|
|
|
[testenv:pyflakes]
|
|
deps = pyflakes
|
|
commands = python tools/flakes.py cinder
|