Skip to contentSkip to conversation

ptest-gnome: add ptest helper for GNOME packages

RFC PATCH New Ross Burton 1 participant 2 messages Jul 23, 2014

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/2 ptest-gnome: add ptest helper for GNOME packages

Many GNOME packages are using their InstalledTests pattern, where the test suite can be trivially installed. To avoid repeating the same logic over and over, add a class to encapsulate this.

---
 meta/classes/ptest-gnome.bbclass |    8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 meta/classes/ptest-gnome.bbclass
meta/classes/ptest-gnome.bbclass new file +8 -0
new file mode 100644
index 0000000..b2949af
@@ -0,0 +1,8 @@
+inherit ptest
+
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-installed-tests', '--disable-installed-tests', d)}"
+
+FILES_${PN}-ptest += "${libexecdir}/installed-tests/ \
+                      ${datadir}/installed-tests/"
+
+RDEPENDS_${PN}-ptest += "gnome-desktop-testing"
Signature · 1 line
1.7.10.4
#1 lore raw

RFC PATCH 2/2 glib-2.0: use ptest-gnome

---
 meta/recipes-core/glib-2.0/glib.inc |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
meta/recipes-core/glib-2.0/glib.inc +2 -5
index 2eda8a1..ce908cf 100644
@@ -25,14 +25,13 @@ PACKAGES =+ "${PN}-utils ${PN}-bash-completion ${PN}-codegen"
 LEAD_SONAME = "libglib-2.0.*"
 FILES_${PN}-utils = "${bindir}/* ${datadir}/glib-2.0/gettext"
 
-inherit autotools gettext gtk-doc pkgconfig ptest
+inherit autotools gettext gtk-doc pkgconfig ptest-gnome
 
 S = "${WORKDIR}/glib-${PV}"
 
 CORECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap --disable-man"
 
-PTEST_CONF = "${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-installed-tests', '--disable-installed-tests', d)}"
-EXTRA_OECONF = "--enable-included-printf=no ${CORECONF} ${PTEST_CONF}"
+EXTRA_OECONF = "--enable-included-printf=no ${CORECONF}"
 EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
 EXTRA_OECONF_append_libc-uclibc = " --with-libiconv=gnu"
 
@@ -51,8 +50,6 @@ FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb \
 FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py"
 FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d \
                                ${datadir}/bash-completion"
-FILES_${PN}-ptest += "${libexecdir}/installed-tests \
-                      ${datadir}/installed-tests/glib"
 
 ARM_INSTRUCTION_SET = "arm"
 USE_NLS = "yes"
Signature · 1 line
1.7.10.4