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: I90d3b61a00cb3e3da0d0c89e49e1a9278aed43c3
This commit is contained in:
parent
9883099cc4
commit
68e758f2f2
9
tox.ini
9
tox.ini
|
@ -17,6 +17,7 @@ whitelist_externals = bash
|
|||
passenv = *_proxy *_PROXY
|
||||
|
||||
[testenv:debug]
|
||||
basepython = python3
|
||||
commands = oslo_debug_helper {posargs}
|
||||
|
||||
[testenv:debug-py27]
|
||||
|
@ -28,12 +29,14 @@ basepython = python3.5
|
|||
commands = oslo_debug_helper {posargs}
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands =
|
||||
flake8 {posargs}
|
||||
# Run security linter
|
||||
bandit -c bandit.yaml -r glare -n5
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
PYTHON=coverage run --source glare --parallel-mode --omit="*/test*"
|
||||
|
@ -44,23 +47,27 @@ commands =
|
|||
coverage xml -o cover/coverage.xml
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:genconfig]
|
||||
basepython = python3
|
||||
commands =
|
||||
oslo-config-generator --config-file etc/oslo-config-generator/glare.conf
|
||||
|
||||
[testenv:genpolicy]
|
||||
basepython = python3
|
||||
sitepackages = False
|
||||
envdir = {toxworkdir}/venv
|
||||
commands =
|
||||
oslopolicy-sample-generator --namespace=glare --output-file=etc/policy.yaml.sample
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python2.7
|
||||
basepython = python3
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
[testenv:bandit]
|
||||
basepython = python3
|
||||
usedevelop = False
|
||||
commands = bandit -c bandit.yaml -r glare -n5 {posargs}
|
||||
|
||||
|
|
Loading…
Reference in New Issue