diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-01-15 01:03:02 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-01-15 01:03:02 +0000 |
| commit | efe33f575f5daa58a2d718bf860e3496968d471b (patch) | |
| tree | 842d5ab7e5775703515b986428069df49d519d2d | |
| parent | fe3ab76b82e9242c18a98cb988f213aaec10ddce (diff) | |
| parent | 9576c6fdeba252d4548c37aa2cbf699f28d4c14b (diff) | |
| download | nova-efe33f575f5daa58a2d718bf860e3496968d471b.tar.gz nova-efe33f575f5daa58a2d718bf860e3496968d471b.tar.xz nova-efe33f575f5daa58a2d718bf860e3496968d471b.zip | |
Merge "Revert "Use testr setuptools commands.""
| -rw-r--r-- | .coveragerc | 3 | ||||
| -rw-r--r-- | tools/test-requires | 2 | ||||
| -rw-r--r-- | tox.ini | 15 |
3 files changed, 11 insertions, 9 deletions
diff --git a/.coveragerc b/.coveragerc index 902a94349..82fe47792 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,7 +1,6 @@ [run] branch = True -source = nova -omit = nova/tests/*,DynamicallyCompiledCheetahTemplate.py +omit = /usr*,setup.py,*egg*,.venv/*,.tox/*,nova/tests/* [report] ignore-errors = True diff --git a/tools/test-requires b/tools/test-requires index c1683fe27..6ee42d31c 100644 --- a/tools/test-requires +++ b/tools/test-requires @@ -11,5 +11,5 @@ pep8==1.3.3 pylint==0.25.2 python-subunit sphinx>=1.1.2 -testrepository>=0.0.12 +testrepository>=0.0.8 testtools>=0.9.22 @@ -8,7 +8,8 @@ setenv = VIRTUAL_ENV={envdir} LC_ALL=C deps = -r{toxinidir}/tools/pip-requires -r{toxinidir}/tools/test-requires -commands = python setup.py testr --slowest --testr-args='{posargs}' +commands = bash -c 'if [ ! -d ./.testrepository ] ; then testr init ; fi' + bash -c 'testr run --parallel {posargs} ; RET=$? ; echo "Slowest Tests" ; testr slowest && exit $RET' [tox:jenkins] sitepackages = True @@ -33,11 +34,13 @@ deps = pyflakes commands = python tools/flakes.py nova [testenv:cover] -# Also do not run test_coverage_ext tests while gathering coverage as those -# tests conflict with coverage. -commands = - python setup.py testr --coverage \ - --testr-args='^(?!.*test_coverage_ext).*$' +# Need to omit DynamicallyCompiledCheetahTemplate.py from coverage because +# it ceases to exist post test run. Also do not run test_coverage_ext tests +# while gathering coverage as those tests conflict with coverage. +setenv = OMIT=--omit=DynamicallyCompiledCheetahTemplate.py + PYTHON=coverage run --source nova --parallel-mode +commands = bash -c 'if [ ! -d ./.testrepository ] ; then testr init ; fi' + bash -c 'testr run --parallel \^\(\?\!\.\*test_coverage_ext\)\.\*\$ ; RET=$? ; coverage combine ; coverage html -d ./cover $OMIT && exit $RET' [testenv:venv] commands = {posargs} |
