summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVu Tran <vu.tran@windriver.com>2014-06-18 15:45:37 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-06-23 15:54:54 -0400
commit514464e1aa202cd6870d769289b709c079e33ce7 (patch)
treee6d59b9074333908582078eadb1f5ede4255bc13
parent1f578a07a36ec3c0bd40548873d9c7c79822ddac (diff)
downloadmeta-cloud-services-514464e1aa202cd6870d769289b709c079e33ce7.tar.gz
cinder builtin tests config location
Many cinder built-in testcases failed because they can not find cinder configuration file, as these testcases assume that they are run at python site-packages dir. So forcing these failure testcases to look for these configuration file using absolute path. Signed-off-by: Vu Tran <vu.tran@windriver.com>
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder/cinder-builtin-tests-config-location.patch24
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder_git.bb5
2 files changed, 29 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder/cinder-builtin-tests-config-location.patch b/meta-openstack/recipes-devtools/python/python-cinder/cinder-builtin-tests-config-location.patch
new file mode 100644
index 0000000..53da893
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-cinder/cinder-builtin-tests-config-location.patch
@@ -0,0 +1,24 @@
1cinder builtin tests config location
2
3Many cinder built-in testcases failed because they
4can not find cinder configuration file, as these
5testcases assume that they are run at python
6site-packages dir. So forcing these failure
7testcases to look for these confiugration file
8using absolute path.
9
10Signed-off-by: Vu Tran <vu.tran@windriver.com>
11
12Index: git/cinder/tests/conf_fixture.py
13===================================================================
14--- git.orig/cinder/tests/conf_fixture.py
15+++ git/cinder/tests/conf_fixture.py
16@@ -43,7 +43,7 @@ def set_defaults(conf):
17 conf.set_default('iscsi_num_targets', 8)
18 conf.set_default('connection', 'sqlite://', group='database')
19 conf.set_default('sqlite_synchronous', False)
20- conf.set_default('policy_file', 'cinder/tests/policy.json')
21+ conf.set_default('policy_file', '%PYTHON_SITEPACKAGES_DIR%/cinder/tests/policy.json')
22 conf.set_default(
23 'xiv_ds8k_proxy',
24 'cinder.tests.test_ibm_xiv_ds8k.XIVDS8KFakeProxyDriver')
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
index 58088c9..0866dca 100644
--- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
@@ -17,6 +17,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/icehouse \
17 file://lvm_iscsi_setup.sh \ 17 file://lvm_iscsi_setup.sh \
18 file://add-cinder-volume-types.sh \ 18 file://add-cinder-volume-types.sh \
19 file://fix_cinder_memory_leak.patch \ 19 file://fix_cinder_memory_leak.patch \
20 file://cinder-builtin-tests-config-location.patch \
20 " 21 "
21 22
22SRCREV="978b036a6467f7f6afb4419f92bf4fa7d1ff2347" 23SRCREV="978b036a6467f7f6afb4419f92bf4fa7d1ff2347"
@@ -27,6 +28,10 @@ inherit setuptools update-rc.d identity default_configs
27 28
28CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift" 29CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift"
29 30
31do_install_prepend() {
32 sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/conf_fixture.py
33}
34
30do_install_append() { 35do_install_append() {
31 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} 36 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME}
32 CINDER_CONF_DIR=${D}${sysconfdir}/${SRCNAME} 37 CINDER_CONF_DIR=${D}${sysconfdir}/${SRCNAME}