diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-12-11 02:24:24 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-12-11 02:30:04 -0500 |
commit | 0e5297c9a87c43fe6011c240fbbe754b053da138 (patch) | |
tree | f1aa1a088ac55bee395dcfac22b701e91009e131 /meta-openstack | |
parent | 8d106c85a99ef8450e098e627428e37386ac6b10 (diff) | |
download | meta-cloud-services-0e5297c9a87c43fe6011c240fbbe754b053da138.tar.gz |
tempest: create per-component test packages and flakes8
To add more complete tempest support, we require flakes8, so it is
added to the dependency list.
To get the individual component test scripts onto the target, create
a $PACKAGE-tests package and add the script. When the tests are
required on target, these packages should be added to the install
list.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack')
7 files changed, 40 insertions, 6 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb index 28ae314..50eacaa 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb +++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb | |||
@@ -47,6 +47,8 @@ do_install_append() { | |||
47 | install -m 0755 ${WORKDIR}/cinder-scheduler.init.sh ${D}${sysconfdir}/init.d/cinder-scheduler | 47 | install -m 0755 ${WORKDIR}/cinder-scheduler.init.sh ${D}${sysconfdir}/init.d/cinder-scheduler |
48 | install -m 0755 ${WORKDIR}/cinder-volume ${D}${sysconfdir}/init.d/cinder-volume | 48 | install -m 0755 ${WORKDIR}/cinder-volume ${D}${sysconfdir}/init.d/cinder-volume |
49 | fi | 49 | fi |
50 | |||
51 | cp run_tests.sh ${CINDER_CONF_DIR} | ||
50 | } | 52 | } |
51 | 53 | ||
52 | pkg_postinst_${SRCNAME}-setup () { | 54 | pkg_postinst_${SRCNAME}-setup () { |
@@ -68,11 +70,13 @@ pkg_postinst_${SRCNAME}-setup () { | |||
68 | echo "include /etc/cinder/data/volumes/*" >> /etc/tgt/targets.conf | 70 | echo "include /etc/cinder/data/volumes/*" >> /etc/tgt/targets.conf |
69 | } | 71 | } |
70 | 72 | ||
71 | PACKAGES += "${SRCNAME} ${SRCNAME}-setup ${SRCNAME}-api ${SRCNAME}-volume ${SRCNAME}-scheduler" | 73 | PACKAGES += "${SRCNAME}-tests ${SRCNAME} ${SRCNAME}-setup ${SRCNAME}-api ${SRCNAME}-volume ${SRCNAME}-scheduler" |
72 | ALLOW_EMPTY_${SRCNAME}-setup = "1" | 74 | ALLOW_EMPTY_${SRCNAME}-setup = "1" |
73 | 75 | ||
74 | FILES_${PN} = "${libdir}/*" | 76 | FILES_${PN} = "${libdir}/*" |
75 | 77 | ||
78 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/run_tests.sh" | ||
79 | |||
76 | FILES_${SRCNAME}-api = "${bindir}/cinder-api \ | 80 | FILES_${SRCNAME}-api = "${bindir}/cinder-api \ |
77 | ${sysconfdir}/init.d/cinder-api" | 81 | ${sysconfdir}/init.d/cinder-api" |
78 | 82 | ||
diff --git a/meta-openstack/recipes-devtools/python/python-glance_git.bb b/meta-openstack/recipes-devtools/python/python-glance_git.bb index 935fdc9..f59af90 100644 --- a/meta-openstack/recipes-devtools/python/python-glance_git.bb +++ b/meta-openstack/recipes-devtools/python/python-glance_git.bb | |||
@@ -56,6 +56,8 @@ do_install_append() { | |||
56 | sed 's:@suffix@:registry:' < ${WORKDIR}/glance.init >${WORKDIR}/glance-registry.init.sh | 56 | sed 's:@suffix@:registry:' < ${WORKDIR}/glance.init >${WORKDIR}/glance-registry.init.sh |
57 | install -m 0755 ${WORKDIR}/glance-registry.init.sh ${D}${sysconfdir}/init.d/glance-registry | 57 | install -m 0755 ${WORKDIR}/glance-registry.init.sh ${D}${sysconfdir}/init.d/glance-registry |
58 | fi | 58 | fi |
59 | |||
60 | cp run_tests.sh ${GLANCE_CONF_DIR} | ||
59 | } | 61 | } |
60 | 62 | ||
61 | pkg_postinst_${SRCNAME}-setup () { | 63 | pkg_postinst_${SRCNAME}-setup () { |
@@ -75,11 +77,13 @@ pkg_postinst_${SRCNAME}-setup () { | |||
75 | glance-manage db_sync | 77 | glance-manage db_sync |
76 | } | 78 | } |
77 | 79 | ||
78 | PACKAGES += " ${SRCNAME} ${SRCNAME}-setup ${SRCNAME}-api ${SRCNAME}-registry" | 80 | PACKAGES += " ${SRCNAME}-tests ${SRCNAME} ${SRCNAME}-setup ${SRCNAME}-api ${SRCNAME}-registry" |
79 | ALLOW_EMPTY_${SRCNAME}-setup = "1" | 81 | ALLOW_EMPTY_${SRCNAME}-setup = "1" |
80 | 82 | ||
81 | FILES_${PN} = "${libdir}/*" | 83 | FILES_${PN} = "${libdir}/*" |
82 | 84 | ||
85 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/run_tests.sh" | ||
86 | |||
83 | FILES_${SRCNAME} = "${bindir}/* \ | 87 | FILES_${SRCNAME} = "${bindir}/* \ |
84 | ${sysconfdir}/${SRCNAME}/* \ | 88 | ${sysconfdir}/${SRCNAME}/* \ |
85 | ${localstatedir}/* \ | 89 | ${localstatedir}/* \ |
diff --git a/meta-openstack/recipes-devtools/python/python-heat_git.bb b/meta-openstack/recipes-devtools/python/python-heat_git.bb index 5cfd8bd..d4314f4 100644 --- a/meta-openstack/recipes-devtools/python/python-heat_git.bb +++ b/meta-openstack/recipes-devtools/python/python-heat_git.bb | |||
@@ -59,6 +59,8 @@ do_install_append() { | |||
59 | sed 's:@suffix@:engine:' < ${WORKDIR}/heat.init >${WORKDIR}/heat-engine.init.sh | 59 | sed 's:@suffix@:engine:' < ${WORKDIR}/heat.init >${WORKDIR}/heat-engine.init.sh |
60 | install -m 0755 ${WORKDIR}/heat-engine.init.sh ${D}${sysconfdir}/init.d/heat-engine | 60 | install -m 0755 ${WORKDIR}/heat-engine.init.sh ${D}${sysconfdir}/init.d/heat-engine |
61 | fi | 61 | fi |
62 | |||
63 | cp run_tests.sh ${HEAT_CONF_DIR} | ||
62 | } | 64 | } |
63 | 65 | ||
64 | pkg_postinst_${SRCNAME}-setup () { | 66 | pkg_postinst_${SRCNAME}-setup () { |
@@ -80,13 +82,15 @@ pkg_postinst_${SRCNAME}-setup () { | |||
80 | 82 | ||
81 | inherit setuptools identity hosts update-rc.d | 83 | inherit setuptools identity hosts update-rc.d |
82 | 84 | ||
83 | PACKAGES += "${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" | 85 | PACKAGES += "${SRCNAME}-tests ${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" |
84 | PACKAGES += "${SRCNAME}-setup" | 86 | PACKAGES += "${SRCNAME}-setup" |
85 | 87 | ||
86 | ALLOW_EMPTY_${SRCNAME}-setup = "1" | 88 | ALLOW_EMPTY_${SRCNAME}-setup = "1" |
87 | 89 | ||
88 | FILES_${PN} = "${libdir}/*" | 90 | FILES_${PN} = "${libdir}/*" |
89 | 91 | ||
92 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/run_tests.sh" | ||
93 | |||
90 | FILES_${SRCNAME}-common = "${sysconfdir}/${SRCNAME}/* \ | 94 | FILES_${SRCNAME}-common = "${sysconfdir}/${SRCNAME}/* \ |
91 | " | 95 | " |
92 | 96 | ||
diff --git a/meta-openstack/recipes-devtools/python/python-horizon_git.bb b/meta-openstack/recipes-devtools/python/python-horizon_git.bb index 789192c..281264c 100644 --- a/meta-openstack/recipes-devtools/python/python-horizon_git.bb +++ b/meta-openstack/recipes-devtools/python/python-horizon_git.bb | |||
@@ -39,6 +39,10 @@ inherit setuptools update-rc.d python-dir | |||
39 | # do_install[dirs] += "${D}/usr/share/bin" | 39 | # do_install[dirs] += "${D}/usr/share/bin" |
40 | 40 | ||
41 | do_install_append() { | 41 | do_install_append() { |
42 | HORIZON_CONF_DIR=${D}${sysconfdir}/horizon | ||
43 | |||
44 | install -d ${HORIZON_CONF_DIR} | ||
45 | |||
42 | DASHBOARD_DIR=${D}${PYTHON_SITEPACKAGES_DIR}/openstack_dashboard | 46 | DASHBOARD_DIR=${D}${PYTHON_SITEPACKAGES_DIR}/openstack_dashboard |
43 | sed -e "s:^LANGUAGE_CODE =.*:LANGUAGE_CODE = 'en-us':g" \ | 47 | sed -e "s:^LANGUAGE_CODE =.*:LANGUAGE_CODE = 'en-us':g" \ |
44 | -i ${DASHBOARD_DIR}/settings.py | 48 | -i ${DASHBOARD_DIR}/settings.py |
@@ -56,12 +60,16 @@ do_install_append() { | |||
56 | 60 | ||
57 | # no longer required. kept as reference. | 61 | # no longer required. kept as reference. |
58 | # mv ${D}${datadir}/bin ${DASHBOARD_DIR}/bin | 62 | # mv ${D}${datadir}/bin ${DASHBOARD_DIR}/bin |
63 | |||
64 | cp run_tests.sh ${HORIZON_CONF_DIR} | ||
59 | } | 65 | } |
60 | 66 | ||
61 | PACKAGES += "${SRCNAME}" | 67 | PACKAGES += "${SRCNAME}-tests ${SRCNAME}" |
62 | 68 | ||
63 | FILES_${PN} = "${libdir}/*" | 69 | FILES_${PN} = "${libdir}/*" |
64 | 70 | ||
71 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/run_tests.sh" | ||
72 | |||
65 | FILES_${SRCNAME} = "${bindir}/* \ | 73 | FILES_${SRCNAME} = "${bindir}/* \ |
66 | ${sysconfdir}/init.d/* \ | 74 | ${sysconfdir}/init.d/* \ |
67 | ${datadir}/* \ | 75 | ${datadir}/* \ |
diff --git a/meta-openstack/recipes-devtools/python/python-keystone_git.bb b/meta-openstack/recipes-devtools/python/python-keystone_git.bb index dbc76d8..c2a9b04 100644 --- a/meta-openstack/recipes-devtools/python/python-keystone_git.bb +++ b/meta-openstack/recipes-devtools/python/python-keystone_git.bb | |||
@@ -48,6 +48,8 @@ do_install_append() { | |||
48 | install -d ${D}${sysconfdir}/init.d | 48 | install -d ${D}${sysconfdir}/init.d |
49 | install -m 0755 ${WORKDIR}/keystone ${D}${sysconfdir}/init.d/keystone | 49 | install -m 0755 ${WORKDIR}/keystone ${D}${sysconfdir}/init.d/keystone |
50 | fi | 50 | fi |
51 | |||
52 | cp run_tests.sh ${KEYSTONE_CONF_DIR} | ||
51 | } | 53 | } |
52 | 54 | ||
53 | pkg_postinst_${SRCNAME}-setup () { | 55 | pkg_postinst_${SRCNAME}-setup () { |
@@ -79,19 +81,22 @@ pkg_postinst_${SRCNAME}-setup () { | |||
79 | # end python-keystone postinst | 81 | # end python-keystone postinst |
80 | } | 82 | } |
81 | 83 | ||
82 | PACKAGES += " ${SRCNAME} ${SRCNAME}-setup" | 84 | PACKAGES += " ${SRCNAME}-tests ${SRCNAME} ${SRCNAME}-setup" |
83 | 85 | ||
84 | ALLOW_EMPTY_${SRCNAME}-setup = "1" | 86 | ALLOW_EMPTY_${SRCNAME}-setup = "1" |
85 | 87 | ||
86 | FILES_${PN} = "${libdir}/*" | 88 | FILES_${PN} = "${libdir}/*" |
87 | 89 | ||
90 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/run_tests.sh" | ||
91 | |||
88 | FILES_${SRCNAME} = "${bindir}/* \ | 92 | FILES_${SRCNAME} = "${bindir}/* \ |
89 | ${sysconfdir}/${SRCNAME}/* \ | 93 | ${sysconfdir}/${SRCNAME}/* \ |
90 | ${sysconfdir}/init.d/* \ | 94 | ${sysconfdir}/init.d/* \ |
91 | ${localstatedir}/* \ | 95 | ${localstatedir}/* \ |
92 | " | 96 | " |
93 | 97 | ||
94 | RDEPENDS_${PN} += "python-pam \ | 98 | RDEPENDS_${PN} += " \ |
99 | python-pam \ | ||
95 | python-webob \ | 100 | python-webob \ |
96 | python-eventlet \ | 101 | python-eventlet \ |
97 | python-greenlet \ | 102 | python-greenlet \ |
@@ -109,6 +114,9 @@ RDEPENDS_${PN} += "python-pam \ | |||
109 | python-dogpile.cache \ | 114 | python-dogpile.cache \ |
110 | " | 115 | " |
111 | 116 | ||
117 | # TODO: | ||
118 | # if DISTRO_FEATURE contains "tempest" then add *-tests to the main RDEPENDS | ||
119 | |||
112 | RDEPENDS_${SRCNAME} = "${PN} postgresql postgresql-client python-psycopg2" | 120 | RDEPENDS_${SRCNAME} = "${PN} postgresql postgresql-client python-psycopg2" |
113 | 121 | ||
114 | INITSCRIPT_PACKAGES = "${SRCNAME}" | 122 | INITSCRIPT_PACKAGES = "${SRCNAME}" |
diff --git a/meta-openstack/recipes-devtools/python/python-neutron_git.bb b/meta-openstack/recipes-devtools/python/python-neutron_git.bb index f33db97..18655b0 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron_git.bb +++ b/meta-openstack/recipes-devtools/python/python-neutron_git.bb | |||
@@ -63,6 +63,8 @@ do_install_append() { | |||
63 | sed "s:@suffix@:$PLUGIN:" < ${WORKDIR}/neutron-agent.init >${WORKDIR}/neutron-$PLUGIN.init.sh | 63 | sed "s:@suffix@:$PLUGIN:" < ${WORKDIR}/neutron-agent.init >${WORKDIR}/neutron-$PLUGIN.init.sh |
64 | install -m 0755 ${WORKDIR}/neutron-$PLUGIN.init.sh ${D}${sysconfdir}/init.d/neutron-$PLUGIN-agent | 64 | install -m 0755 ${WORKDIR}/neutron-$PLUGIN.init.sh ${D}${sysconfdir}/init.d/neutron-$PLUGIN-agent |
65 | fi | 65 | fi |
66 | |||
67 | cp run_tests.sh ${NEUTRON_CONF_DIR} | ||
66 | } | 68 | } |
67 | 69 | ||
68 | pkg_postinst_${SRCNAME}-setup () { | 70 | pkg_postinst_${SRCNAME}-setup () { |
@@ -93,6 +95,7 @@ ALLOW_EMPTY_${SRCNAME}-setup = "1" | |||
93 | ALLOW_EMPTY_${SRCNAME}-plugin-openvswitch-setup = "1" | 95 | ALLOW_EMPTY_${SRCNAME}-plugin-openvswitch-setup = "1" |
94 | 96 | ||
95 | PACKAGES += " \ | 97 | PACKAGES += " \ |
98 | ${SRCNAME}-tests \ | ||
96 | ${SRCNAME} \ | 99 | ${SRCNAME} \ |
97 | ${SRCNAME}-doc \ | 100 | ${SRCNAME}-doc \ |
98 | ${SRCNAME}-server \ | 101 | ${SRCNAME}-server \ |
@@ -108,6 +111,8 @@ PACKAGES += " \ | |||
108 | 111 | ||
109 | FILES_${PN} = "${libdir}/*" | 112 | FILES_${PN} = "${libdir}/*" |
110 | 113 | ||
114 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/run_tests.sh" | ||
115 | |||
111 | FILES_${SRCNAME} = " \ | 116 | FILES_${SRCNAME} = " \ |
112 | ${bindir}/neutron-db-manage \ | 117 | ${bindir}/neutron-db-manage \ |
113 | ${bindir}/neutron-rootwrap \ | 118 | ${bindir}/neutron-rootwrap \ |
diff --git a/meta-openstack/recipes-extended/tempest/tempest_git.bb b/meta-openstack/recipes-extended/tempest/tempest_git.bb index 3e37640..d747905 100644 --- a/meta-openstack/recipes-extended/tempest/tempest_git.bb +++ b/meta-openstack/recipes-extended/tempest/tempest_git.bb | |||
@@ -85,5 +85,6 @@ RDEPENDS_${PN} += " \ | |||
85 | python-six \ | 85 | python-six \ |
86 | python-iso8601 \ | 86 | python-iso8601 \ |
87 | python-mimeparse \ | 87 | python-mimeparse \ |
88 | python-flake8 \ | ||
88 | " | 89 | " |
89 | 90 | ||