From eb66359572b003e3babf58fca317363cd06a16c0 Mon Sep 17 00:00:00 2001 From: Vu Tran Date: Mon, 16 Jun 2014 21:44:13 -0400 Subject: glance builtin tests config location and missing packages Many glance built-in testcases failed because they can not find glance configuration files, 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. Also some tests fail because of missing two packages: python-psutil and qpid-python. So add these packages into glance-tests RDEPENDS Signed-off-by: Vu Tran --- meta-openstack/recipes-devtools/python/python-glance_git.bb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'meta-openstack/recipes-devtools/python/python-glance_git.bb') diff --git a/meta-openstack/recipes-devtools/python/python-glance_git.bb b/meta-openstack/recipes-devtools/python/python-glance_git.bb index e9e8353..57ad34c 100644 --- a/meta-openstack/recipes-devtools/python/python-glance_git.bb +++ b/meta-openstack/recipes-devtools/python/python-glance_git.bb @@ -9,6 +9,7 @@ SRCNAME = "glance" SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ file://glance.init \ + file://glance-change-builtin-tests-config-location.patch \ " SRCREV="396ca82f7e359b430a6cb0a6162d7bc937367705" @@ -20,6 +21,12 @@ inherit setuptools update-rc.d identity default_configs GLANCE_DEFAULT_STORE ?= "file" +do_install_prepend() { + sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/functional/__init__.py + sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/unit/base.py + sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/utils.py +} + do_install_append() { TEMPLATE_CONF_DIR=${S}${sysconfdir} GLANCE_CONF_DIR=${D}${sysconfdir}/glance @@ -142,6 +149,7 @@ RDEPENDS_${SRCNAME} = "${PN} \ RDEPENDS_${SRCNAME}-api = "${SRCNAME}" RDEPENDS_${SRCNAME}-registry = "${SRCNAME}" RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}" +RDEPENDS_${SRCNAME}-tests = "python-psutil qpid-python" INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-registry" INITSCRIPT_NAME_${SRCNAME}-api = "glance-api" -- cgit v1.2.3-54-g00ecf