From 6ec4823919f74e4cff10c47fdaccf96865d00620 Mon Sep 17 00:00:00 2001 From: "huang.zhiping" Date: Sat, 9 Jun 2018 18:20:58 +0800 Subject: [PATCH] fix tox python3 overrides We want to default to running all tox environments under python 3, so set the basepython value in each environment. We do not want to specify a minor version number, because we do not want to have to update the file every time we upgrade python. We do not want to set the override once in testenv, because that breaks the more specific versions used in default environments like py35 and py36. Change-Id: Iddea984cd32fd0b048a396cde27e3d12ae07119e --- tox.ini | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tox.ini b/tox.ini index 3857d8285..55171fb49 100644 --- a/tox.ini +++ b/tox.ini @@ -20,9 +20,11 @@ commands = stestr slowest [testenv:releasenotes] +basepython = python3 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:pep8] +basepython = python3 commands = flake8 # pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron_lbaas} @@ -31,6 +33,7 @@ commands = whitelist_externals = sh [testenv:cover] +basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --source neutron_lbaas --parallel-mode @@ -40,9 +43,11 @@ commands = coverage report [testenv:venv] +basepython = python3 commands = {posargs} [testenv:docs] +basepython = python3 commands = python setup.py build_sphinx [flake8] @@ -77,6 +82,7 @@ deps = -r{toxinidir}/neutron_lbaas/tests/functional/requirements.txt [testenv:dsvm-functional] +basepython = python3 setenv = {[testenv]setenv} {[testenv:functional]setenv} OS_SUDO_TESTING=1 @@ -91,6 +97,7 @@ commands = # If you are running the tests locally you should set the env variable # TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc [testenv:apiv2] +basepython = python3 passenv = TEMPEST_CONFIG_DIR setenv = OS_TEST_PATH={toxinidir}/neutron_lbaas/tests/tempest/v2/api @@ -101,6 +108,7 @@ commands = # If you are running the tests locally you should set the env variable # TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc [testenv:scenario] +basepython = python3 passenv = TEMPEST_CONFIG_DIR setenv = OS_TEST_PATH={toxinidir}/neutron_lbaas/tests/tempest/v2/scenario @@ -111,6 +119,7 @@ commands = # If you are running the tests locally you should set the env variable # TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc [testenv:ddt] +basepython = python3 passenv = TEMPEST_CONFIG_DIR setenv = OS_TEST_PATH={toxinidir}/neutron_lbaas/tests/tempest/v2/ddt @@ -119,6 +128,7 @@ commands = stestr slowest [testenv:genconfig] +basepython = python3 commands = {toxinidir}/tools/generate_config_file_samples.sh [testenv:lower-constraints]