From b2cf21f9bacceace8abe3f80256e3a9cd141c5ae Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Sat, 16 Nov 2013 22:49:01 -0500 Subject: tempest: fix configuration for test execution The initial integration of tempest didn't configure logging.conf or tempest.conf with the proper values for test execution. With this commit, we have a log configuration, passwords and other settings such that basic tests may be executed on target as follows: root@controller:/usr/lib/python2.7/site-packages# nosetests tempest/api To build the tests into the controller image, the following should be added to local.conf: OPENSTACK_CONTROLLER_EXTRA_INSTALL += "tempest" Signed-off-by: Bruce Ashfield --- .../recipes-extended/tempest/tempest/logging.conf | 2 +- .../recipes-extended/tempest/tempest/tempest.conf | 6 +- .../recipes-extended/tempest/tempest_git.bb | 70 ++++++++++------------ 3 files changed, 37 insertions(+), 41 deletions(-) (limited to 'meta-openstack/recipes-extended') diff --git a/meta-openstack/recipes-extended/tempest/tempest/logging.conf b/meta-openstack/recipes-extended/tempest/tempest/logging.conf index 3b468f1..3ab27ba 100644 --- a/meta-openstack/recipes-extended/tempest/tempest/logging.conf +++ b/meta-openstack/recipes-extended/tempest/tempest/logging.conf @@ -43,4 +43,4 @@ args=(sys.stdout,) format=%(name)s: %(levelname)s: %(message)s [formatter_tests] -class = tempest.common.log.TestsFormatter +# class = tempest.common.log.TestsFormatter diff --git a/meta-openstack/recipes-extended/tempest/tempest/tempest.conf b/meta-openstack/recipes-extended/tempest/tempest/tempest.conf index aebda69..1406c5d 100644 --- a/meta-openstack/recipes-extended/tempest/tempest/tempest.conf +++ b/meta-openstack/recipes-extended/tempest/tempest/tempest.conf @@ -35,7 +35,7 @@ region = RegionOne # This should be the username of a user WITHOUT administrative privileges username = demo # The above non-administrative user's password -password = secret +password = %ADMIN_PASSWORD% # The above non-administrative user's tenant name tenant_name = demo @@ -43,14 +43,14 @@ tenant_name = demo # administrative privileges alt_username = alt_demo # The above non-administrative user's password -alt_password = secret +alt_password = %ADMIN_PASSWORD% # The above non-administrative user's tenant name alt_tenant_name = alt_demo # This should be the username of a user WITH administrative privileges admin_username = admin # The above administrative user's password -admin_password = secret +admin_password = %ADMIN_PASSWORD% # The above administrative user's tenant name admin_tenant_name = admin diff --git a/meta-openstack/recipes-extended/tempest/tempest_git.bb b/meta-openstack/recipes-extended/tempest/tempest_git.bb index 250e541..3e37640 100644 --- a/meta-openstack/recipes-extended/tempest/tempest_git.bb +++ b/meta-openstack/recipes-extended/tempest/tempest_git.bb @@ -7,6 +7,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" PR = "r0" SRCNAME = "tempest" +inherit setuptools identity hosts + SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ file://tempest.conf \ file://logging.conf \ @@ -37,57 +39,51 @@ do_install_append() { sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" -i ${WORKDIR}/tempest.conf install -d ${TEMPEST_CONF_DIR} + install -d ${TEMPEST_CONF_DIR}/tests install -m 600 ${WORKDIR}/tempest.conf ${TEMPEST_CONF_DIR} install -m 600 ${WORKDIR}/logging.conf ${TEMPEST_CONF_DIR} install -m 600 ${TEMPLATE_CONF_DIR}/*.yaml ${TEMPEST_CONF_DIR} -} -pkg_postinst_${SRCNAME}() { - if [ "x$D" != "x" ]; then - exit 1 - fi - - # This is to make sure postgres is configured and running - if ! pidof postmaster > /dev/null; then - /etc/init.d/postgresql-init - /etc/init.d/postgresql start - sleep 5 - fi + # relocate tests to somewhere less cryptic, which means we pull them out of + # site-packages and put them in /etc/tempest/tests/ + for t in api cli scenario stress thirdparty; do + ln -s ${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/$t ${TEMPEST_CONF_DIR}/tests/ + done } -inherit setuptools identity hosts +PACKAGES =+ "${SRCNAME}-tests" -# PACKAGES += "${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" +FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/tests/*" FILES_${PN} = "${libdir}/* \ ${sysconfdir}/* \ " - RDEPENDS_${PN} += " \ - python-testrepository \ - python-fixtures \ - python-keyring \ + ${SRCNAME}-tests \ + python-testrepository \ + python-fixtures \ + python-keyring \ python-glanceclient \ python-keystoneclient \ python-swiftclient \ - python-novaclient \ - python-cinderclient \ - python-heatclient \ - python-pbr \ - python-anyjson \ - python-nose \ - python-httplib2 \ - python-jsonschema \ - python-testtools \ - python-lxml \ - python-boto \ - python-paramiko \ - python-netaddr \ - python-testresources \ - python-oslo.config \ - python-eventlet \ - python-six \ - python-iso8601 \ - python-mimeparse \ + python-novaclient \ + python-cinderclient \ + python-heatclient \ + python-pbr \ + python-anyjson \ + python-nose \ + python-httplib2 \ + python-jsonschema \ + python-testtools \ + python-lxml \ + python-boto \ + python-paramiko \ + python-netaddr \ + python-testresources \ + python-oslo.config \ + python-eventlet \ + python-six \ + python-iso8601 \ + python-mimeparse \ " -- cgit v1.2.3-54-g00ecf