From 30858d62d97467b0f7b06e6cb58c107a4fb78e26 Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Sat, 18 Jan 2014 15:13:35 +0800 Subject: [PATCH] Added coverage patches Change-Id: I4fc0e23bd202febcb3ad7bebb88a02204758a4cf Rewritten-From: 60fdfd1495317ce7be1bf50f783093d3404af800 --- .../fix-call-of-coverage-command.patch | 33 +++++++++++++++ .../patches/python-m-coverage-take2.patch | 41 +++++++++++++++++++ trusty/debian/patches/series | 2 + 3 files changed, 76 insertions(+) create mode 100644 trusty/debian/patches/fix-call-of-coverage-command.patch create mode 100644 trusty/debian/patches/python-m-coverage-take2.patch diff --git a/trusty/debian/patches/fix-call-of-coverage-command.patch b/trusty/debian/patches/fix-call-of-coverage-command.patch new file mode 100644 index 0000000..b3be6e2 --- /dev/null +++ b/trusty/debian/patches/fix-call-of-coverage-command.patch @@ -0,0 +1,33 @@ +Description: Use python -m coverage instead of just coverage +Author: Thomas Goirand +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/trusty/debian/patches/python-m-coverage-take2.patch b/trusty/debian/patches/python-m-coverage-take2.patch new file mode 100644 index 0000000..d019f46 --- /dev/null +++ b/trusty/debian/patches/python-m-coverage-take2.patch @@ -0,0 +1,41 @@ +Description: + 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 + +--- +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: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +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=$? + diff --git a/trusty/debian/patches/series b/trusty/debian/patches/series index e883b03..a9f105c 100644 --- a/trusty/debian/patches/series +++ b/trusty/debian/patches/series @@ -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 -- 2.45.2