From ed99254573e932d0c668f275ab76bd03d49a6dc0 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 6 Jun 2018 16:05:56 -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: I8049df0d8241271122c0587b639c135836846827 Signed-off-by: Doug Hellmann --- tox.ini | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tox.ini b/tox.ini index 682a955b8..a7b88adec 100644 --- a/tox.ini +++ b/tox.ini @@ -23,11 +23,13 @@ commands = whitelist_externals = bash [testenv:cover] +basepython = python3 commands = pifpaf -g AODH_TEST_STORAGE_URL run mysql -- python setup.py testr --slowest --coverage --testr-args="{posargs}" coverage report [testenv:pep8] +basepython = python3 deps = hacking>=0.12,<0.13 commands = flake8 @@ -35,28 +37,34 @@ commands = bash -c "find aodh -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null" [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:docs] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = python setup.py build_sphinx setenv = PYTHONHASHSEED=0 [testenv:venv] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = {posargs} setenv = PYTHONHASHSEED=0 [testenv:debug] +basepython = python3 commands = bash -x oslo_debug_helper {posargs} [testenv:debug-mysql] +basepython = python3 deps = .[mysql,test] setenv = OS_TEST_PATH=aodh/tests/functional/ commands = pifpaf -g AODH_TEST_STORAGE_URL run mysql -- oslo_debug_helper {posargs} [testenv:debug-pgsql] +basepython = python3 deps = .[postgresql,test] setenv = OS_TEST_PATH=aodh/tests/functional/ commands = pifpaf -g AODH_TEST_STORAGE_URL run postgresql -- oslo_debug_helper {posargs}