From cf4ad5eaea4af3da3bbac4c421fe5f959ed1d256 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 21 Nov 2014 18:54:20 -0600 Subject: update tox/travis to check code coverage on py3 coverage is combined between py2 and py3 for an aggregate coverage metric. This means we can stop putting "no cover" gates around py3 code and ignoring whether it's ever tested. --- tox.ini | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index 3f32dbc3f..ba0007d7a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,15 +1,17 @@ [tox] envlist = - py26,py27,py32,py33,py34,pypy,pypy3,cover + clean,py26,py27,py32,py33,py34,pypy,pypy3,report + +[testenv:clean] +commands = coverage erase +deps = coverage [testenv] commands = python setup.py dev - python setup.py test -q + python setup.py nosetests --with-coverage -[testenv:cover] -basepython = - python2.6 +[testenv:report] commands = python setup.py dev python setup.py nosetests --with-xunit --with-xcoverage --cover-min-percentage=100 -- cgit v1.2.3 From 14126cae5cf308ed466ed3eea576094e9c2193b4 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 11 Feb 2015 12:25:02 -0600 Subject: fix up tests to generate coverage reports always and combine at the end --- tox.ini | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index ba0007d7a..dae31ddd6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,24 +1,27 @@ [tox] +skipsdist = True envlist = - clean,py26,py27,py32,py33,py34,pypy,pypy3,report - -[testenv:clean] -commands = coverage erase -deps = coverage + py26,py27,py32,py33,py34,pypy,pypy3,cover [testenv] commands = - python setup.py dev - python setup.py nosetests --with-coverage + {envbindir}/python setup.py dev + {envbindir}/coverage run --source={toxinidir}/pyramid {envbindir}/nosetests --xunit-file=nosetests-{envname}.xml + {envbindir}/coverage xml -o coverage-{envname}.xml +setenv = + COVERAGE_FILE=.coverage.{envname} -[testenv:report] +[testenv:cover] commands = - python setup.py dev - python setup.py nosetests --with-xunit --with-xcoverage --cover-min-percentage=100 + {envbindir}/coverage erase + {envbindir}/coverage combine + {envbindir}/coverage xml + {envbindir}/coverage report --show-missing --fail-under=100 deps = - nosexcover + coverage +setenv = + COVERAGE_FILE=.coverage # we separate coverage into its own testenv because a) "last run wins" wrt # cobertura jenkins reporting and b) pypy and jython can't handle any # combination of versions of coverage and nosexcover that i can find. - -- cgit v1.2.3 From a9282da880bfc1da654fc1c547a20fdfb3539fd1 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 20 Feb 2015 17:52:41 -0600 Subject: split out targets for py2-cover and py3-cover and add docs building --- tox.ini | 70 +++++++++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 53 insertions(+), 17 deletions(-) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index dae31ddd6..22f21a6a3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,27 +1,63 @@ [tox] -skipsdist = True -envlist = - py26,py27,py32,py33,py34,pypy,pypy3,cover +envlist = + py26,py27,py32,py33,py34,pypy,pypy3, + {py2,py3}-docs + {py2,py3}-cover,coverage [testenv] -commands = - {envbindir}/python setup.py dev - {envbindir}/coverage run --source={toxinidir}/pyramid {envbindir}/nosetests --xunit-file=nosetests-{envname}.xml - {envbindir}/coverage xml -o coverage-{envname}.xml +# Most of these are defaults but if you specify any you can't fall back +# to defaults for others. +basepython = + py26: python2.6 + py27: python2.7 + py32: python3.2 + py33: python3.3 + py34: python3.4 + pypy: pypy + pypy3: pypy3 + py2: python2.7 + py3: python3.4 + +commands = + pip install pyramid[testing] + nosetests --with-xunit --xunit-file=nosetests-{envname}.xml {posargs:} + +[testenv:py2-cover] +commands = + pip install pyramid[testing] + coverage run --source=pyramid {envbindir}/nosetests --with-xunit --xunit-file=nosetests-py2.xml {posargs:} + coverage xml -o coverage-py2.xml +setenv = + COVERAGE_FILE=.coverage.py2 + +[testenv:py3-cover] +commands = + pip install pyramid[testing] + coverage run --source=pyramid {envbindir}/nosetests --with-xunit --xunit-file=nosetests-py3.xml {posargs:} + coverage xml -o coverage-py3.xml setenv = - COVERAGE_FILE=.coverage.{envname} + COVERAGE_FILE=.coverage.py3 + +[testenv:py2-docs] +whitelist_externals = make +commands = + pip install pyramid[docs] + make -C docs html -[testenv:cover] +[testenv:py3-docs] +whitelist_externals = make +commands = + pip install pyramid[docs] + make -C docs html + +[testenv:coverage] +basepython = python3.4 commands = - {envbindir}/coverage erase - {envbindir}/coverage combine - {envbindir}/coverage xml - {envbindir}/coverage report --show-missing --fail-under=100 + coverage erase + coverage combine + coverage xml + coverage report --show-missing --fail-under=100 deps = coverage setenv = COVERAGE_FILE=.coverage - -# we separate coverage into its own testenv because a) "last run wins" wrt -# cobertura jenkins reporting and b) pypy and jython can't handle any -# combination of versions of coverage and nosexcover that i can find. -- cgit v1.2.3 From d476e6932f67adee5116620b546590ba0c2083de Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 20 Feb 2015 17:57:25 -0600 Subject: dump xunit for py2/py3 targets --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index 22f21a6a3..e0f99e7f6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = py26,py27,py32,py33,py34,pypy,pypy3, - {py2,py3}-docs + {py2,py3}-docs, {py2,py3}-cover,coverage [testenv] @@ -25,7 +25,7 @@ commands = [testenv:py2-cover] commands = pip install pyramid[testing] - coverage run --source=pyramid {envbindir}/nosetests --with-xunit --xunit-file=nosetests-py2.xml {posargs:} + coverage run --source=pyramid {envbindir}/nosetests coverage xml -o coverage-py2.xml setenv = COVERAGE_FILE=.coverage.py2 @@ -33,7 +33,7 @@ setenv = [testenv:py3-cover] commands = pip install pyramid[testing] - coverage run --source=pyramid {envbindir}/nosetests --with-xunit --xunit-file=nosetests-py3.xml {posargs:} + coverage run --source=pyramid {envbindir}/nosetests coverage xml -o coverage-py3.xml setenv = COVERAGE_FILE=.coverage.py3 -- cgit v1.2.3