From 514464e1aa202cd6870d769289b709c079e33ce7 Mon Sep 17 00:00:00 2001 From: Vu Tran Date: Wed, 18 Jun 2014 15:45:37 -0400 Subject: 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 --- .../cinder-builtin-tests-config-location.patch | 24 ++++++++++++++++++++++ .../recipes-devtools/python/python-cinder_git.bb | 5 +++++ 2 files changed, 29 insertions(+) create mode 100644 meta-openstack/recipes-devtools/python/python-cinder/cinder-builtin-tests-config-location.patch (limited to 'meta-openstack/recipes-devtools/python') 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 @@ +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 + +Index: git/cinder/tests/conf_fixture.py +=================================================================== +--- git.orig/cinder/tests/conf_fixture.py ++++ git/cinder/tests/conf_fixture.py +@@ -43,7 +43,7 @@ def set_defaults(conf): + conf.set_default('iscsi_num_targets', 8) + 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_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 \ 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="978b036a6467f7f6afb4419f92bf4fa7d1ff2347" @@ -27,6 +28,10 @@ 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 +} + do_install_append() { TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} CINDER_CONF_DIR=${D}${sysconfdir}/${SRCNAME} -- cgit v1.2.3-54-g00ecf