Merge "tox: Use conditional targets"

This commit is contained in:
Jenkins 2016-07-25 18:38:03 +00:00 committed by Gerrit Code Review
commit 6cf0e9e213

21
tox.ini
View File

@ -1,6 +1,6 @@
[tox] [tox]
minversion = 2.0 minversion = 2.0
envlist = py34,py27,functional,pep8,pip-missing-reqs envlist = py{34,27},functional,pep8,pip-missing-reqs
skipsdist = True skipsdist = True
[testenv] [testenv]
@ -15,8 +15,12 @@ setenv = VIRTUAL_ENV={envdir}
LC_ALL=en_US.utf-8 LC_ALL=en_US.utf-8
PYTHONDONTWRITEBYTECODE=1 PYTHONDONTWRITEBYTECODE=1
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
# NOTE(mriedem): If py34 fails with "db type could not be determined", delete
# .testrepository and try again. Running py34 before py27 is OK, but not the
# other way around. See: https://bugs.launchpad.net/testrepository/+bug/1212909
commands = commands =
bash tools/pretty_tox.sh '{posargs}' py27: bash tools/pretty_tox.sh '{posargs}'
py{34,35}: bash tools/pretty_tox3.sh '{posargs}'
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG
# there is also secret magic in pretty_tox.sh which lets you run in a fail only # there is also secret magic in pretty_tox.sh which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable. # mode. To do this define the TRACE_FAILONLY environmental variable.
@ -27,19 +31,6 @@ deps = hacking
commands = commands =
bash tools/flake8wrap.sh {posargs} bash tools/flake8wrap.sh {posargs}
[testenv:py34]
# NOTE(mriedem): If py34 fails with "db type could not be determined", delete
# .testrepository and try again. Running py34 before py27 is OK, but not the
# other way around. See: https://bugs.launchpad.net/testrepository/+bug/1212909
setenv = {[testenv]setenv}
commands =
bash tools/pretty_tox3.sh '{posargs}'
[testenv:py35]
setenv = {[testenv]setenv}
commands =
bash tools/pretty_tox3.sh '{posargs}'
[testenv:functional] [testenv:functional]
usedevelop = True usedevelop = True
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}