From 68e25e05cee2bfda18b68027a1a593b065e7bc24 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Tue, 11 Dec 2018 11:11:08 +0900 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. NOTE: legacy-neutron-fwaas-dsvm-functional is failing. This needs to be fixed in a separate patch. Change-Id: I71dc6449c64b9a9f974d83e51423a7c67a42c551 --- tox.ini | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tox.ini b/tox.ini index 6e16f7a3b..d36556744 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,7 @@ setenv = OS_TEST_TIMEOUT=180 commands = false [testenv:dsvm] +basepython = python3 # Fake job to define environment variables shared between dsvm jobs setenv = OS_SUDO_TESTING=1 OS_ROOTWRAP_CMD=sudo {envdir}/bin/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf @@ -36,6 +37,7 @@ setenv = OS_SUDO_TESTING=1 commands = false [testenv:functional] +#TODO(njohnston): Fix failures blocking dsvm-functional converting to py3 setenv = {[testenv]setenv} {[testenv:common]setenv} OS_TEST_PATH=./neutron_fwaas/tests/functional @@ -44,6 +46,7 @@ commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:dsvm-fullstack] +basepython = python3 setenv = {[testenv]setenv} {[testenv:common]setenv} {[testenv:dsvm]setenv} @@ -53,6 +56,7 @@ setenv = {[testenv]setenv} sitepackages=True [testenv:api] +basepython = python3 sitepackages=True setenv = OS_TEST_PATH=./neutron_fwaas/tests/tempest_plugin/tests/api/ @@ -62,6 +66,7 @@ commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:scenario] +basepython = python3 sitepackages=True setenv = OS_TEST_PATH=./neutron_fwaas/tests/tempest_plugin/tests/scenario/ @@ -87,10 +92,12 @@ commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:releasenotes] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:pep8] +basepython = python3 commands = flake8 doc8 {posargs} @@ -101,11 +108,13 @@ commands = whitelist_externals = sh [testenv:cover] +basepython = python3 commands = python setup.py test --coverage --coverage-package-name=neutron_fwaas --testr-args='{posargs}' coverage report [testenv:venv] +basepython = python3 commands = {posargs} deps = -r{toxinidir}/doc/requirements.txt @@ -144,6 +153,7 @@ exclude = .venv,.git,.tox,dist,doc,*lib/python*,.tmp,*egg,build,tools,.ropeproje import-order-style = pep8 [testenv:pylint] +basepython = python3 deps = {[testenv]deps} pylint @@ -155,6 +165,7 @@ import_exceptions = neutron_fwaas._i18n local-check-factory = neutron_lib.hacking.checks.factory [testenv:genconfig] +basepython = python3 commands = {toxinidir}/tools/generate_config_file_samples.sh [testenv:genpolicy]