From 82419043bf74b09fb590e8170bf07dd22f096191 Mon Sep 17 00:00:00 2001 From: "huang.zhiping" Date: Sat, 9 Jun 2018 18:46:12 +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: Ie5b0294a912f1bcd8015197eacd9ac0f48e2cd14 --- tox.ini | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index cefd3fa..51aa15a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 1.6 -envlist = pep8,py27 +envlist = pep8,py27,py35 skipsdist = True [testenv] @@ -14,15 +14,18 @@ deps = -r{toxinidir}/requirements.txt commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:pep8] +basepython = python3 commands = flake8 {posargs} [testenv:py27] commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:venv] +basepython = python3 commands = {posargs} [testenv:cover] +basepython = python3 commands = python setup.py testr --coverage --testr-args='{posargs}' [flake8] @@ -34,16 +37,20 @@ local-check-factory = nova.hacking.checks.factory import_exceptions = nova.i18n [testenv:pip-missing-reqs] +basepython = python3 deps = pip_missing_reqs commands = pip-missing-reqs -d --ignore-file=nova/tests/* nova [testenv:bandit] +basepython = python3 deps = bandit commands = bandit -r nova/virt/zvm -n 5 -ll [testenv:genconfig] +basepython = python3 commands = oslo-config-generator --config-file=etc/nova/nova-zvm-oslo-conf-generator.conf [testenv:docs] +basepython = python3 commands = python setup.py build_sphinx