summaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
authorJames E. Blair <corvus@inaugust.com>2013-01-14 21:44:21 +0000
committerJames E. Blair <jeblair@openstack.org>2013-01-14 14:05:50 -0800
commit9576c6fdeba252d4548c37aa2cbf699f28d4c14b (patch)
tree697afdc7953708d2e674f0474491c8ee77e7b517 /tox.ini
parent09254af268827cf2921387e3a7ef28cf0502e5a5 (diff)
downloadnova-9576c6fdeba252d4548c37aa2cbf699f28d4c14b.tar.gz
nova-9576c6fdeba252d4548c37aa2cbf699f28d4c14b.tar.xz
nova-9576c6fdeba252d4548c37aa2cbf699f28d4c14b.zip
Revert "Use testr setuptools commands."
This reverts commit c945b71929d7dc872ea27103ca8b6ec3d5cc7cd5 which caused the unit test command to always exit sucessfully. Change-Id: I410cbc878675503f0ce6e50bddc4fd0552370c46
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini15
1 files changed, 9 insertions, 6 deletions
diff --git a/tox.ini b/tox.ini
index cf565c19f..1c43be4ed 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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}