]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commitdiff
Add ubuntu patches
authorMehdi Abaakouk <sileht@sileht.net>
Thu, 20 Sep 2012 06:58:02 +0000 (08:58 +0200)
committerMehdi Abaakouk <sileht@sileht.net>
Thu, 20 Sep 2012 06:58:02 +0000 (08:58 +0200)
Rewritten-From: 06ae303916289ef1156c03fc7e41fbdfcd7ebf3c

trusty/debian/patches/fix-dashboard-django-wsgi.patch [new file with mode: 0644]
trusty/debian/patches/fix-dashboard-manage.patch [new file with mode: 0644]
trusty/debian/patches/fix-ubuntu-tests.patch [new file with mode: 0644]
trusty/debian/patches/series

diff --git a/trusty/debian/patches/fix-dashboard-django-wsgi.patch b/trusty/debian/patches/fix-dashboard-django-wsgi.patch
new file mode 100644 (file)
index 0000000..af18a09
--- /dev/null
@@ -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 (file)
index 0000000..a7b2ebf
--- /dev/null
@@ -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 (file)
index 0000000..900186d
--- /dev/null
@@ -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']
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..53bc79dc7be599d01091c6f23523977c6104896c 100644 (file)
@@ -0,0 +1,3 @@
+fix-dashboard-django-wsgi.patch
+fix-dashboard-manage.patch
+fix-ubuntu-tests.patch