]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commitdiff
Added coverage patches
authorThomas Goirand <thomas@goirand.fr>
Sat, 18 Jan 2014 07:13:35 +0000 (15:13 +0800)
committerThomas Goirand <thomas@goirand.fr>
Sat, 18 Jan 2014 07:14:11 +0000 (15:14 +0800)
Change-Id: I4fc0e23bd202febcb3ad7bebb88a02204758a4cf

Rewritten-From: 60fdfd1495317ce7be1bf50f783093d3404af800

xenial/debian/patches/fix-call-of-coverage-command.patch [new file with mode: 0644]
xenial/debian/patches/python-m-coverage-take2.patch [new file with mode: 0644]
xenial/debian/patches/series

diff --git a/xenial/debian/patches/fix-call-of-coverage-command.patch b/xenial/debian/patches/fix-call-of-coverage-command.patch
new file mode 100644 (file)
index 0000000..b3be6e2
--- /dev/null
@@ -0,0 +1,33 @@
+Description: Use python -m coverage instead of just coverage
+Author: Thomas Goirand <zigo@debian.org>
+Forwarded: no
+Last-Update: 2013-12-18
+
+Index: horizon/run_tests.sh
+===================================================================
+--- horizon.orig/run_tests.sh  2014-01-18 15:13:54.000000000 +0800
++++ horizon/run_tests.sh       2014-01-18 15:13:59.000000000 +0800
+@@ -310,8 +310,8 @@
+   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=$?
+@@ -326,9 +326,9 @@
+   if [ $with_coverage -eq 1 ]; then
+     echo "Generating coverage reports"
+-    ${command_wrapper} coverage combine
+-    ${command_wrapper} coverage xml -i --omit='/usr*,setup.py,*egg*,.venv/*'
+-    ${command_wrapper} coverage html -i --omit='/usr*,setup.py,*egg*,.venv/*' -d reports
++    ${command_wrapper} python -m coverage combine
++    ${command_wrapper} python -m coverage xml -i --omit='/usr*,setup.py,*egg*,.venv/*'
++    ${command_wrapper} python -m coverage html -i --omit='/usr*,setup.py,*egg*,.venv/*' -d reports
+   fi
+   # Remove the leftover coverage files from the -p flag earlier.
+   rm -f .coverage.*
diff --git a/xenial/debian/patches/python-m-coverage-take2.patch b/xenial/debian/patches/python-m-coverage-take2.patch
new file mode 100644 (file)
index 0000000..d019f46
--- /dev/null
@@ -0,0 +1,41 @@
+Description: <short summary of the patch>
+ TODO: Put a short summary on the line above and replace this paragraph
+ with a longer explanation of this change. Complete the meta-information
+ with other relevant fields (see below for details). To make it easier, the
+ information below has been extracted from the changelog. Adjust it or drop
+ it.
+ .
+ horizon (2013.2.1-1) unstable; urgency=medium
+ .
+   * New upstream release.
+   * Removes patch now applied upstream for CVE-2013-6858.
+   * (build-)depends needs python-iso8601 >= 0.1.8.
+   * Added a patch to use python -m coverage instead of just coverage.
+Author: Thomas Goirand <zigo@debian.org>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+Index: horizon/run_tests.sh
+===================================================================
+--- horizon.orig/run_tests.sh  2014-01-18 15:13:43.000000000 +0800
++++ horizon/run_tests.sh       2014-01-18 15:13:43.000000000 +0800
+@@ -320,7 +320,7 @@
+   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=$?
index e883b0358c2035eff2581538e242ec72baf1c5fe..a9f105c57daeee5d9025096d9cd01756567fd04b 100644 (file)
@@ -1,3 +1,5 @@
 fix-dashboard-django-wsgi.patch
 fix-dashboard-manage.patch
 fixed-horizon-MANIFEST.in.patch
+fix-call-of-coverage-command.patch
+python-m-coverage-take2.patch