diff mbox series

json-glib: add ptest

Message ID 20181120151745.13553-1-ross.burton@intel.com
State Accepted
Commit c33e9b5a6ecd43796ff88e44f68b122248145aa0
Headers show
Series json-glib: add ptest | expand

Commit Message

Ross Burton Nov. 20, 2018, 3:17 p.m. UTC
Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 meta/recipes-gnome/json-glib/json-glib/run-ptest |  3 +++
 meta/recipes-gnome/json-glib/json-glib_1.4.2.bb  | 12 +++++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)
 create mode 100644 meta/recipes-gnome/json-glib/json-glib/run-ptest

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-gnome/json-glib/json-glib/run-ptest b/meta/recipes-gnome/json-glib/json-glib/run-ptest
new file mode 100644
index 00000000000..0c6398a177d
--- /dev/null
+++ b/meta/recipes-gnome/json-glib/json-glib/run-ptest
@@ -0,0 +1,3 @@ 
+#! /bin/sh
+
+gnome-desktop-testing-runner json-glib
diff --git a/meta/recipes-gnome/json-glib/json-glib_1.4.2.bb b/meta/recipes-gnome/json-glib/json-glib_1.4.2.bb
index 19fe3cc4427..b4a6a6f2b63 100644
--- a/meta/recipes-gnome/json-glib/json-glib_1.4.2.bb
+++ b/meta/recipes-gnome/json-glib/json-glib_1.4.2.bb
@@ -10,12 +10,13 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
 
 DEPENDS = "glib-2.0"
 
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase lib_package gobject-introspection gtk-doc gettext ptest-gnome
+
+SRC_URI += "file://run-ptest"
 SRC_URI[archive.md5sum] = "35107e23a7bbbc70f31c34f7b9adf1c3"
 SRC_URI[archive.sha256sum] = "2d7709a44749c7318599a6829322e081915bdc73f5be5045882ed120bb686dc8"
 
-GNOMEBASEBUILDCLASS = "meson"
-inherit gnomebase lib_package gobject-introspection gtk-doc gettext
-
 # This builds both API docs (via gtk-doc) and manpages
 GTKDOC_ENABLE_FLAG = "-Ddocs=true"
 GTKDOC_DISABLE_FLAG = "-Ddocs=false"
@@ -29,8 +30,9 @@  EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'T
                                                                                     '${GI_DISABLE_FLAG}', d)} "
 
 do_install_append() {
-    # FIXME: these need to be provided via ptest
-    rm -rf ${D}${datadir}/installed-tests ${D}${libexecdir}
+	if ! ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then
+		rm -rf ${D}${datadir}/installed-tests ${D}${libexecdir}
+	fi
 }
 
 BBCLASSEXTEND = "native nativesdk"