aboutsummaryrefslogtreecommitdiffstats
path: root/meta-openstack
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:55:45 -0400
commitcb6a12ad7c10b7cf2922facd3464200272a34996 (patch)
treeb43966bffc53341c9f64243760529d63f0f54c9d /meta-openstack
parenteb66359572b003e3babf58fca317363cd06a16c0 (diff)
downloadmeta-cloud-services-cb6a12ad7c10b7cf2922facd3464200272a34996.tar.gz
meta-cloud-services-cb6a12ad7c10b7cf2922facd3464200272a34996.tar.bz2
meta-cloud-services-cb6a12ad7c10b7cf2922facd3464200272a34996.zip
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>
Diffstat (limited to 'meta-openstack')
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder/cinder-builtin-tests-config-location.patch36
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder_git.bb6
2 files changed, 42 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 00000000..c6bdfa76
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-cinder/cinder-builtin-tests-config-location.patch
@@ -0,0 +1,36 @@
+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 confiugration file
+using absolute path.
+
+Signed-off-by: Vu Tran <vu.tran@windriver.com>
+
+diff --git a/cinder/tests/conf_fixture.py b/cinder/tests/conf_fixture.py
+index dbf8d08..ac925eb 100644
+--- a/cinder/tests/conf_fixture.py
++++ b/cinder/tests/conf_fixture.py
+@@ -43,7 +43,7 @@ def set_defaults(conf):
+ conf.set_default('verbose', True)
+ conf.set_default('connection', 'sqlite://', group='database')
+ conf.set_default('sqlite_synchronous', False)
+- conf.set_default('policy_file', 'cinder/tests/policy.json')
++ conf.set_default('policy_file', '%PYTHON_SITEPACKAGES_DIR%/cinder/tests/policy.json')
+ conf.set_default(
+ 'xiv_ds8k_proxy',
+ 'cinder.tests.test_xiv_ds8k.XIVDS8KFakeProxyDriver')
+diff --git a/cinder/tests/fake_flags.py b/cinder/tests/fake_flags.py
+index 3bf94ae..998524c 100644
+--- a/cinder/tests/fake_flags.py
++++ b/cinder/tests/fake_flags.py
+@@ -43,6 +43,6 @@ def set_defaults(conf):
+ conf.set_default('verbose', True)
+ conf.set_default('connection', 'sqlite://', group='database')
+ conf.set_default('sqlite_synchronous', False)
+- conf.set_default('policy_file', 'cinder/tests/policy.json')
++ conf.set_default('policy_file', '%PYTHON_SITEPACKAGES_DIR%/cinder/tests/policy.json')
+ conf.set_default('xiv_proxy', 'cinder.tests.test_xiv.XIVFakeProxyDriver')
+ conf.set_default('backup_driver', 'cinder.tests.backup.fake_service')
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
index b723257d..7b3bb284 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/havana \
file://lvm_iscsi_setup.sh \
file://add-cinder-volume-types.sh \
file://fix_cinder_memory_leak.patch \
+ file://cinder-builtin-tests-config-location.patch \
"
SRCREV="81259f36f57e91b31009fbd209ea2a07a2ceb213"
@@ -27,6 +28,11 @@ inherit setuptools update-rc.d identity default_configs
CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift"
+do_install_prepend() {
+ sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/conf_fixture.py
+ sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/fake_flags.py
+}
+
do_install_append() {
TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME}
CINDER_CONF_DIR=${D}${sysconfdir}/${SRCNAME}