From: Thomas Goirand Date: Tue, 28 Jan 2014 16:00:53 +0000 (+0800) Subject: Refresh coverage patch. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=df4d14454183c54608f4c3fac08d4517ed09612d;p=openstack-build%2Fhorizon-build.git Refresh coverage patch. Change-Id: Ifc8bff59825cf04d0ad8d5badbbeb8738be3718a Rewritten-From: dd71bcde27db92f5fc00061011feff11d59fd584 --- diff --git a/trusty/debian/patches/fix-python-m-coverage.patch b/trusty/debian/patches/fix-python-m-coverage.patch new file mode 100644 index 0000000..a386dc7 --- /dev/null +++ b/trusty/debian/patches/fix-python-m-coverage.patch @@ -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 +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.* diff --git a/trusty/debian/patches/series b/trusty/debian/patches/series index e883b03..a017bfa 100644 --- a/trusty/debian/patches/series +++ b/trusty/debian/patches/series @@ -1,3 +1,4 @@ fix-dashboard-django-wsgi.patch fix-dashboard-manage.patch fixed-horizon-MANIFEST.in.patch +fix-python-m-coverage.patch