diff options
author | Monty Taylor <mordred@inaugust.com> | 2013-01-11 15:32:25 +0100 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2013-01-12 13:33:42 -0800 |
commit | c945b71929d7dc872ea27103ca8b6ec3d5cc7cd5 (patch) | |
tree | d30480a239a9b05cf9f0fce5e8bc32b05e3b6813 | |
parent | acbf4ea118bd65fe73d5c31275990bf4992e80f7 (diff) | |
download | nova-c945b71929d7dc872ea27103ca8b6ec3d5cc7cd5.tar.gz |
Use testr setuptools commands.
Replace the embedded shell scripts with setuptools commands provided by
upstream. Cleans up a few warnings that this cause tox to show.
Change-Id: I9eb47142eafb6ed038b358b94984462ca1632542
-rw-r--r-- | .coveragerc | 3 | ||||
-rw-r--r-- | tools/test-requires | 2 | ||||
-rw-r--r-- | tox.ini | 15 |
3 files changed, 9 insertions, 11 deletions
diff --git a/.coveragerc b/.coveragerc index 82fe477929..902a94349e 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,6 +1,7 @@ [run] branch = True -omit = /usr*,setup.py,*egg*,.venv/*,.tox/*,nova/tests/* +source = nova +omit = nova/tests/*,DynamicallyCompiledCheetahTemplate.py [report] ignore-errors = True diff --git a/tools/test-requires b/tools/test-requires index 6ee42d31ce..c1683fe27f 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.8 +testrepository>=0.0.12 testtools>=0.9.22 @@ -8,8 +8,7 @@ setenv = VIRTUAL_ENV={envdir} LC_ALL=C deps = -r{toxinidir}/tools/pip-requires -r{toxinidir}/tools/test-requires -commands = bash -c 'if [ ! -d ./.testrepository ] ; then testr init ; fi' - bash -c 'testr run --parallel {posargs} ; RET=$? ; echo "Slowest Tests" ; testr slowest && exit $RET' +commands = python setup.py testr --slowest --testr-args='{posargs}' [tox:jenkins] sitepackages = True @@ -34,13 +33,11 @@ deps = pyflakes commands = python tools/flakes.py nova [testenv:cover] -# 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' +# 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).*$' [testenv:venv] commands = {posargs} |