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 <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 16:06:03 -04:00
parent 61ae4a2cd3
commit e51a31f05d
1 changed files with 14 additions and 0 deletions

14
tox.ini
View File

@ -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}