Ensure tests run under python2.7
tox uses whatever python version that tox ran with as the default python version for environments (py27,py3x, etc are given a more specific default). Debian's python-tox (for example) uses python3, but we require python2.7 - and a naive `apt-get install python-tox; tox -epep8` fails with py3-related errors on Debian. This change explicitly sets `basepython = python2.7` in several testing environments that would otherwise have used the default basepython. Change-Id: I377ac6d72dec5b85c105d8a1a74f6974efb84dcf
This commit is contained in:
parent
d283e23d76
commit
40783cee5e
5
tox.ini
5
tox.ini
@ -26,9 +26,11 @@ commands =
|
|||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
|
|
||||||
[testenv:api]
|
[testenv:api]
|
||||||
|
basepython = python2.7
|
||||||
setenv = OS_TEST_PATH=./neutron/tests/api
|
setenv = OS_TEST_PATH=./neutron/tests/api
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
|
basepython = python2.7
|
||||||
setenv = OS_TEST_PATH=./neutron/tests/functional
|
setenv = OS_TEST_PATH=./neutron/tests/functional
|
||||||
OS_TEST_TIMEOUT=90
|
OS_TEST_TIMEOUT=90
|
||||||
deps =
|
deps =
|
||||||
@ -36,6 +38,7 @@ deps =
|
|||||||
-r{toxinidir}/neutron/tests/functional/requirements.txt
|
-r{toxinidir}/neutron/tests/functional/requirements.txt
|
||||||
|
|
||||||
[testenv:dsvm-functional]
|
[testenv:dsvm-functional]
|
||||||
|
basepython = python2.7
|
||||||
setenv = OS_TEST_PATH=./neutron/tests/functional
|
setenv = OS_TEST_PATH=./neutron/tests/functional
|
||||||
OS_SUDO_TESTING=1
|
OS_SUDO_TESTING=1
|
||||||
OS_ROOTWRAP_CMD=sudo {envbindir}/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf
|
OS_ROOTWRAP_CMD=sudo {envbindir}/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf
|
||||||
@ -50,6 +53,7 @@ sitepackages = True
|
|||||||
downloadcache = ~/cache/pip
|
downloadcache = ~/cache/pip
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
|
basepython = python2.7
|
||||||
deps =
|
deps =
|
||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
pylint
|
pylint
|
||||||
@ -62,6 +66,7 @@ commands=
|
|||||||
whitelist_externals = sh
|
whitelist_externals = sh
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
|
basepython = python2.7
|
||||||
commands =
|
commands =
|
||||||
python setup.py testr --coverage --testr-args='{posargs}'
|
python setup.py testr --coverage --testr-args='{posargs}'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user