summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Holman <Keith.Holman@windriver.com>2014-05-30 12:55:48 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-06-04 09:25:17 -0400
commit045ae7561255022fa8b019b624338ce11ad63e2a (patch)
tree364f6f058920a9e8933886ea4f1e6ce6448546d5
parent49263d8e69fec058f300d4b5e98c667069a4cbbd (diff)
downloadmeta-cloud-services-045ae7561255022fa8b019b624338ce11ad63e2a.tar.gz
horizon: add full path to test directories
The tests included Horizon expect all files to be in a single location in order to be run directly from the source tree. The recipe for installing Horizon on the system installs Horizon as a python site-package and puts files in different locations depending on the file type. In order to have the tests support this type of install we need to explicitly indicate the full path of the test files to exclude in order to have the tests run successfully. This fix adds the absolute path to the test locations allows the Horizon tests to pass as expected. Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
-rw-r--r--meta-openstack/recipes-devtools/python/python-horizon/horizon-use-full-package-path-to-test-directories.patch39
-rw-r--r--meta-openstack/recipes-devtools/python/python-horizon_git.bb2
2 files changed, 41 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-horizon/horizon-use-full-package-path-to-test-directories.patch b/meta-openstack/recipes-devtools/python/python-horizon/horizon-use-full-package-path-to-test-directories.patch
new file mode 100644
index 0000000..e5e1966
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-horizon/horizon-use-full-package-path-to-test-directories.patch
@@ -0,0 +1,39 @@
1From 89aa2a575687013f4b4f4d4353c50af1de4c26ba Mon Sep 17 00:00:00 2001
2From: Keith Holman <Keith.Holman@windriver.com>
3Date: Fri, 30 May 2014 11:58:33 -0400
4Subject: [PATCH] horizon: use full package path to test directories
5
6The tests included Horizon expect all files to be in a single
7location in order to be run directly from the source tree. The
8recipe for installing Horizon on the system installs Horizon
9as a python site-package and puts files in different locations
10depending on the file type. In order to have the tests support
11this type of install we need to explicitly indicate the full path
12of the test files to exclude in order to have the tests run
13successfully. This fix adds an identifier that will be replaced
14within the build recipe with the full path to the python site
15packages.
16
17Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
18---
19 horizon/test/settings.py | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/horizon/test/settings.py b/horizon/test/settings.py
23index f5ea700..10318eb 100644
24--- a/horizon/test/settings.py
25+++ b/horizon/test/settings.py
26@@ -95,8 +95,8 @@ SITE_BRANDING = 'Horizon'
27 TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
28 NOSE_ARGS = ['--nocapture',
29 '--nologcapture',
30- '--exclude-dir=horizon/conf/',
31- '--exclude-dir=horizon/test/customization',
32+ '--exclude-dir=%PYTHON_SITEPACKAGES%/horizon/conf/',
33+ '--exclude-dir=%PYTHON_SITEPACKAGES%/horizon/test/customization',
34 '--cover-package=horizon',
35 '--cover-inclusive',
36 '--all-modules']
37--
381.9.3
39
diff --git a/meta-openstack/recipes-devtools/python/python-horizon_git.bb b/meta-openstack/recipes-devtools/python/python-horizon_git.bb
index af74472..fd246db 100644
--- a/meta-openstack/recipes-devtools/python/python-horizon_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-horizon_git.bb
@@ -38,6 +38,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \
38 file://openstack-dashboard-apache.conf \ 38 file://openstack-dashboard-apache.conf \
39 file://local_settings.py \ 39 file://local_settings.py \
40 file://horizon-fix-test-script-to-not-require-coverage-tool.patch \ 40 file://horizon-fix-test-script-to-not-require-coverage-tool.patch \
41 file://horizon-use-full-package-path-to-test-directories.patch \
41 " 42 "
42 43
43SRCREV="cd1de75ee2a8c246d5564e96ccc48185816c2290" 44SRCREV="cd1de75ee2a8c246d5564e96ccc48185816c2290"
@@ -68,6 +69,7 @@ do_install_append() {
68 sed 's:@PYTHON_SITEPACKAGES@:${PYTHON_SITEPACKAGES_DIR}:' ${WORKDIR}/horizon.init >${WORKDIR}/horizon 69 sed 's:@PYTHON_SITEPACKAGES@:${PYTHON_SITEPACKAGES_DIR}:' ${WORKDIR}/horizon.init >${WORKDIR}/horizon
69 install -m 0755 ${WORKDIR}/horizon ${D}${sysconfdir}/init.d/horizon 70 install -m 0755 ${WORKDIR}/horizon ${D}${sysconfdir}/init.d/horizon
70 fi 71 fi
72 sed -i -e 's#%PYTHON_SITEPACKAGES%#${PYTHON_SITEPACKAGES_DIR}#g' ${D}${PYTHON_SITEPACKAGES_DIR}/horizon/test/settings.py
71 73
72 # no longer required. kept as reference. 74 # no longer required. kept as reference.
73 # mv ${D}${datadir}/bin ${DASHBOARD_DIR}/bin 75 # mv ${D}${datadir}/bin ${DASHBOARD_DIR}/bin