Package: horizon / 2014.1.3-7+deb8u2

0004_fix-python-m-coverage.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Description: Use "python -m covergate" instead of just "coverage"
 In Debian, there's no "coverage" command, so we need to apply this.
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2014-03-14

Index: horizon/run_tests.sh
===================================================================
--- horizon.orig/run_tests.sh	2014-04-02 18:21:26.000000000 +0800
+++ horizon/run_tests.sh	2014-04-02 18:29:17.000000000 +0800
@@ -319,8 +319,8 @@
     export NOSE_HTML_OUT_FILE='horizon_nose_results.html'
   fi
   if [ $with_coverage -eq 1 ]; then
-    ${command_wrapper} coverage erase
-    coverage_run="coverage run -p"
+    ${command_wrapper} python -m coverage erase
+    coverage_run="python -m coverage run -p"
   fi
   ${command_wrapper} ${coverage_run} $root/manage.py test horizon --settings=horizon.test.settings $testopts
   # get results of the Horizon tests
@@ -337,9 +337,9 @@
 
   if [ $with_coverage -eq 1 ]; then
     echo "Generating coverage reports"
-    ${command_wrapper} coverage combine
-    ${command_wrapper} coverage xml -i --include="horizon/*,openstack_dashboard/*" --omit='/usr*,setup.py,*egg*,.venv/*'
-    ${command_wrapper} coverage html -i --include="horizon/*,openstack_dashboard/*" --omit='/usr*,setup.py,*egg*,.venv/*' -d reports
+    ${command_wrapper} python -m coverage combine
+    ${command_wrapper} python -m coverage xml -i --include="horizon/*,openstack_dashboard/*" --omit='/usr*,setup.py,*egg*,.venv/*'
+    ${command_wrapper} python -m coverage html -i --include="horizon/*,openstack_dashboard/*" --omit='/usr*,setup.py,*egg*,.venv/*' -d reports
   fi
   # Remove the leftover coverage files from the -p flag earlier.
   rm -f .coverage.*