From 7cfcea46b9ed5777d89a3ea7ecb3136405af9828 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Thu, 20 Sep 2012 08:58:02 +0200 Subject: [PATCH] Add ubuntu patches Rewritten-From: 06ae303916289ef1156c03fc7e41fbdfcd7ebf3c --- .../patches/fix-dashboard-django-wsgi.patch | 13 +++++ .../debian/patches/fix-dashboard-manage.patch | 13 +++++ trusty/debian/patches/fix-ubuntu-tests.patch | 55 +++++++++++++++++++ trusty/debian/patches/series | 3 + 4 files changed, 84 insertions(+) create mode 100644 trusty/debian/patches/fix-dashboard-django-wsgi.patch create mode 100644 trusty/debian/patches/fix-dashboard-manage.patch create mode 100644 trusty/debian/patches/fix-ubuntu-tests.patch diff --git a/trusty/debian/patches/fix-dashboard-django-wsgi.patch b/trusty/debian/patches/fix-dashboard-django-wsgi.patch new file mode 100644 index 0000000..af18a09 --- /dev/null +++ b/trusty/debian/patches/fix-dashboard-django-wsgi.patch @@ -0,0 +1,13 @@ +Index: horizon/openstack_dashboard/wsgi/django.wsgi +=================================================================== +--- horizon.orig/openstack_dashboard/wsgi/django.wsgi 2012-07-03 14:07:21.316118123 -0700 ++++ horizon/openstack_dashboard/wsgi/django.wsgi 2012-07-03 14:07:26.176118333 -0700 +@@ -9,6 +9,8 @@ + os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings' + sys.stdout = sys.stderr + ++sys.path.append("/usr/share/openstack-dashboard/") ++ + DEBUG = False + + application = django.core.handlers.wsgi.WSGIHandler() diff --git a/trusty/debian/patches/fix-dashboard-manage.patch b/trusty/debian/patches/fix-dashboard-manage.patch new file mode 100644 index 0000000..a7b2ebf --- /dev/null +++ b/trusty/debian/patches/fix-dashboard-manage.patch @@ -0,0 +1,13 @@ +Index: horizon-2012.2/manage.py +=================================================================== +--- horizon-2012.2.orig/manage.py 2012-09-04 16:32:01.000000000 -0700 ++++ horizon-2012.2/manage.py 2012-09-04 16:32:52.250690667 -0700 +@@ -5,6 +5,8 @@ + + from django.core.management import execute_from_command_line + ++sys.path.append("/usr/share/openstack-dashboard") ++ + if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", + "openstack_dashboard.settings") diff --git a/trusty/debian/patches/fix-ubuntu-tests.patch b/trusty/debian/patches/fix-ubuntu-tests.patch new file mode 100644 index 0000000..900186d --- /dev/null +++ b/trusty/debian/patches/fix-ubuntu-tests.patch @@ -0,0 +1,55 @@ +Index: horizon-2012.2/run_tests.sh +=================================================================== +--- horizon-2012.2.orig/run_tests.sh 2012-08-23 18:52:34.891973319 -0700 ++++ horizon-2012.2/run_tests.sh 2012-08-23 18:53:15.879971813 -0700 +@@ -274,25 +274,25 @@ + 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.tests.testsettings $testargs ++ ${command_wrapper} python-coverage erase ++ ${command_wrapper} python-coverage run -p $root/manage.py test horizon --settings=horizon.tests.testsettings $testargs + # get results of the Horizon tests + HORIZON_RESULT=$? + +- echo "Running openstack_dashboard tests" +- export NOSE_XUNIT_FILE=openstack_dashboard/nosetests.xml +- 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 $testargs +- # get results of the openstack_dashboard tests +- DASHBOARD_RESULT=$? ++# echo "Running openstack_dashboard tests" ++# export NOSE_XUNIT_FILE=openstack_dashboard/nosetests.xml ++# if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then ++# export NOSE_HTML_OUT_FILE='dashboard_nose_results.html' ++# fi ++# ${command_wrapper} python-coverage run -p $root/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings $testargs ++# # 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 --omit='/usr*,setup.py,*egg*,.venv/*' +- ${command_wrapper} coverage html -i --omit='/usr*,setup.py,*egg*,.venv/*' -d reports ++ ${command_wrapper} python-coverage combine ++ ${command_wrapper} python-coverage xml -i --omit='/usr*,setup.py,*egg*,.venv/*' ++ ${command_wrapper} python-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.* +Index: horizon-2012.2/horizon/tests/testsettings.py +=================================================================== +--- horizon-2012.2.orig/horizon/tests/testsettings.py 2012-08-23 18:52:34.647973328 -0700 ++++ horizon-2012.2/horizon/tests/testsettings.py 2012-08-23 18:54:36.615968847 -0700 +@@ -98,7 +98,6 @@ + TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' + NOSE_ARGS = ['--nocapture', + '--nologcapture', +- '--exclude-dir=horizon/conf/', + '--cover-package=horizon', + '--cover-inclusive'] + diff --git a/trusty/debian/patches/series b/trusty/debian/patches/series index e69de29..53bc79d 100644 --- a/trusty/debian/patches/series +++ b/trusty/debian/patches/series @@ -0,0 +1,3 @@ +fix-dashboard-django-wsgi.patch +fix-dashboard-manage.patch +fix-ubuntu-tests.patch -- 2.45.2