Fix the coverage tox target
It was broken for a long while, since the migration of the dashboard code into Horizon, and then back into this repository, as .testr.conf was removed. Use coverage directly instead of testrepository, the same way as Horizon does. We should port the normal test runner to the Django test runner too, instead of the custom run_tests.sh script, but that's for another (future) review. Change-Id: I08966ddc7e891156a1c934bb115ce8a02f77ec83
This commit is contained in:
parent
0c10d0825f
commit
465b10e1ef
13
.coveragerc
Normal file
13
.coveragerc
Normal file
@ -0,0 +1,13 @@
|
||||
[run]
|
||||
branch = True
|
||||
source = sahara_dashboard
|
||||
omit =
|
||||
.tox/*
|
||||
sahara_dashboard/test/*
|
||||
|
||||
[paths]
|
||||
source = sahara_dashboard
|
||||
|
||||
[report]
|
||||
ignore_errors = True
|
||||
precision = 3
|
@ -112,7 +112,6 @@ six==1.10.0
|
||||
statsd==3.2.1
|
||||
stevedore==1.20.0
|
||||
tenacity==3.2.1
|
||||
testrepository==0.0.18
|
||||
testscenarios==0.4
|
||||
testtools==2.2.0
|
||||
traceback2==1.4.0
|
||||
|
@ -12,7 +12,6 @@ netifaces>=0.10.4 # MIT
|
||||
nose-exclude>=0.5.0 # LGPL
|
||||
python-subunit>=1.0.0 # Apache-2.0/BSD
|
||||
selenium>=2.50.1 # Apache-2.0
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
testtools>=2.2.0 # MIT
|
||||
# This also needs xvfb library installed on your OS
|
||||
|
6
tox.ini
6
tox.ini
@ -54,7 +54,11 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||
commands =
|
||||
coverage erase
|
||||
coverage run {toxinidir}/manage.py test sahara_dashboard --settings=sahara_dashboard.test.settings --exclude-dir=sahara_dashboard/test/integration_tests {posargs}
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
|
||||
[testenv:debug]
|
||||
basepython = python3
|
||||
|
Loading…
Reference in New Issue
Block a user