From e51a31f05d23feab589757ac3c34c0e3b2df0911 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 6 Jun 2018 16:06:03 -0400 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: I4e0defc19b6455333dfe9d7501ba190dc0964f5c Signed-off-by: Doug Hellmann --- tox.ini | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tox.ini b/tox.ini index 63c27bbb..57b240cb 100644 --- a/tox.ini +++ b/tox.ini @@ -49,6 +49,7 @@ setenv = OS_TEST_PATH=panko/tests/functional/ commands = pifpaf run elasticsearch {toxinidir}/tools/pretty_tox.sh "{posargs}" [testenv:py35-elastic] +basepython = python3 setenv = OS_TEST_PATH=panko/tests/functional/ commands = pifpaf run elasticsearch {toxinidir}/tools/pretty_tox.sh "{posargs}" @@ -57,55 +58,68 @@ commands = pifpaf run elasticsearch {toxinidir}/tools/pretty_tox.sh "{posargs}" # gabbi tests without needing to do discovery across the entire body of # tests. [testenv:gabbi] +basepython = python3 setenv = OS_TEST_PATH=panko/tests/functional/gabbi passenv = PANKO_* commands = pifpaf run mongodb {toxinidir}/tools/pretty_tox.sh "{posargs}" [testenv:cover] +basepython = python3 setenv = OS_TEST_PATH=panko/tests commands = python setup.py testr --slowest --coverage --testr-args="{posargs}" coverage report [testenv:pep8] +basepython = python3 deps = hacking<0.13,>=0.12.0 doc8 commands = flake8 doc8 {posargs} [testenv:releasenotes] +basepython = python3 commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:genconfig] +basepython = python3 commands = oslo-config-generator --config-file=etc/panko/panko-config-generator.conf [testenv:genpolicy] +basepython = python3 commands = oslopolicy-sample-generator --config-file=etc/panko/panko-policy-generator.conf [testenv:docs] +basepython = python3 commands = python setup.py build_sphinx setenv = PYTHONHASHSEED=0 [testenv:venv] +basepython = python3 commands = {posargs} setenv = PYTHONHASHSEED=0 [testenv:debug] +basepython = python3 commands = bash -x oslo_debug_helper {posargs} [testenv:debug-mongodb] +basepython = python3 setenv = OS_TEST_PATH=panko/tests/functional commands = pifpaf --debug run mongodb oslo_debug_helper {posargs} [testenv:debug-mysql] +basepython = python3 setenv = OS_TEST_PATH=panko/tests/functional commands = pifpaf --debug run mysql oslo_debug_helper {posargs} [testenv:debug-pgsql] +basepython = python3 setenv = OS_TEST_PATH=panko/tests/functional commands = pifpaf --debug run postgresql oslo_debug_helper {posargs} [testenv:debug-elastic] +basepython = python3 setenv = OS_TEST_PATH=panko/tests/functional commands = pifpaf --debug run elasticsearch oslo_debug_helper {posargs}