]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commitdiff
Refresh coverage patch.
authorThomas Goirand <thomas@goirand.fr>
Tue, 28 Jan 2014 16:00:53 +0000 (00:00 +0800)
committerThomas Goirand <thomas@goirand.fr>
Tue, 28 Jan 2014 16:00:53 +0000 (00:00 +0800)
Change-Id: Ifc8bff59825cf04d0ad8d5badbbeb8738be3718a

Rewritten-From: dd71bcde27db92f5fc00061011feff11d59fd584

trusty/debian/patches/fix-python-m-coverage.patch [new file with mode: 0644]
trusty/debian/patches/series

diff --git a/trusty/debian/patches/fix-python-m-coverage.patch b/trusty/debian/patches/fix-python-m-coverage.patch
new file mode 100644 (file)
index 0000000..a386dc7
--- /dev/null
@@ -0,0 +1,39 @@
+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-01-29
+
+--- horizon-2014.1~b2.orig/run_tests.sh
++++ horizon-2014.1~b2/run_tests.sh
+@@ -310,8 +310,8 @@ function run_tests_all {
+   if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then
+     export NOSE_HTML_OUT_FILE='horizon_nose_results.html'
+   fi
+-  ${command_wrapper} coverage erase
+-  ${command_wrapper} coverage run -p $root/manage.py test horizon --settings=horizon.test.settings $testopts
++  ${command_wrapper} python -m coverage erase
++  ${command_wrapper} python -m coverage run -p $root/manage.py test horizon --settings=horizon.test.settings $testopts
+   # get results of the Horizon tests
+   HORIZON_RESULT=$?
+@@ -320,15 +320,15 @@ function run_tests_all {
+   if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then
+     export NOSE_HTML_OUT_FILE='dashboard_nose_results.html'
+   fi
+-  ${command_wrapper} coverage run -p $root/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings $testopts
++  ${command_wrapper} python -m coverage run -p $root/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings $testopts
+   # get results of the openstack_dashboard tests
+   DASHBOARD_RESULT=$?
+   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.*
index e883b0358c2035eff2581538e242ec72baf1c5fe..a017bfa83efd75d565b1ae5186708e7078ea0c85 100644 (file)
@@ -1,3 +1,4 @@
 fix-dashboard-django-wsgi.patch
 fix-dashboard-manage.patch
 fixed-horizon-MANIFEST.in.patch
+fix-python-m-coverage.patch