summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.coveragerc9
-rw-r--r--tox.ini18
2 files changed, 16 insertions, 11 deletions
diff --git a/.coveragerc b/.coveragerc
index 6f625763..45e8572b 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -2,8 +2,10 @@
[run]
branch = True
-timid=True
-include=*reddwarf*
+source=.tox/cover/lib/python2.7/site-packages/reddwarf
+# replace with previous line once the python path issue is resolved and the tox.ini is fixed accordingly
+# source=reddwarf
+omit=*reddwarf/tests*,*reddwarf/openstack/common*
[report]
# Regexes for lines to exclude from consideration
@@ -24,3 +26,6 @@ exclude_lines =
if __name__ == .__main__.:
ignore_errors = False
+
+[html]
+directory=cover
diff --git a/tox.ini b/tox.ini
index edf3fbb6..201eea0d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -6,9 +6,8 @@ setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/tools/pip-requires
-r{toxinidir}/tools/test-requires
setuptools_git>=0.4
-commands = {envpython} run_tests.py {posargs}
- bash -c 'if [ ! -d ./.testrepository ] ; then testr init ; fi'
- bash -c 'testr run --parallel {posargs} ; RET=$? ; echo "Slowest Tests" ; testr slowest && exit $RET'
+commands = {envpython} run_tests.py
+ python setup.py testr --slowest
[tox:jenkins]
sitepackages = True
@@ -20,13 +19,14 @@ deps = pep8
commands = pep8 --repeat --show-source --ignore=E125 --exclude=.venv,.tox,dist,doc,openstack,*egg reddwarf
[testenv:cover]
-setenv = NOSE_WITH_COVERAGE=1
-# TODO(tim.simpson): For some reason, this must run twice before the coverage
-# report is accurate.
commands =
- {toxinidir}/.tox/cover/bin/coverage erase
- {toxinidir}/.tox/cover/bin/coverage run --timid -p run_tests.py {posargs}
- {toxinidir}/.tox/cover/bin/coverage html -d covhtml -i --omit=*tests*,*openstack*,*reddwarfclient*
+ coverage erase
+ coverage run -m subunit.run discover ./reddwarf/tests/unittests
+# replace with above line once the python path issue is resolved
+# python setup.py testr --coverage
+ coverage run -a run_tests.py
+ coverage html
+ coverage report
[testenv:venv]