]> code.ossystems Code Review - openembedded-core.git/commitdiff
clutter-1.0: add ptest
authorTim Orling <ticotimo@gmail.com>
Wed, 8 Oct 2014 03:00:13 +0000 (20:00 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 30 Dec 2014 11:38:40 +0000 (11:38 +0000)
Upstream has reworked installed-tests, use them for ptest.
Default output format for tests is not TAP, add patch to generate TAP output.
Run tests with gnome-desktop-testing-runner, which understands TAP output.

Tested on nuc with core-image-clutter and core-image-weston.

Reminder that for "pure" wayland (e.g. core-image-weston) you need to "export CLUTTER_BACKEND = wayland" to get past setting the DISPLAY variable expected for X11 backend.

Signed-off-by: Tim Orling <TicoTimo@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/clutter/clutter-1.0.inc
meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch [new file with mode: 0644]
meta/recipes-graphics/clutter/clutter-1.0/run-ptest [new file with mode: 0644]
meta/recipes-graphics/clutter/clutter-1.0_1.20.0.bb

index 77035d746f6f5f315d3d6802ebb9441eaa751bf0..3929765a9d2068e8e23976dc62f5f8df8d0d4eeb 100644 (file)
@@ -2,7 +2,7 @@ SUMMARY = "Graphics library for creating hardware-accelerated user interfaces"
 HOMEPAGE = "http://www.clutter-project.org/"
 LICENSE = "LGPLv2.1+"
 
-inherit clutter
+inherit clutter ptest-gnome
 
 DEPENDS = "pango glib-2.0 json-glib atk udev cogl-1.0"
 PACKAGE_BEFORE_PN += "${PN}-examples"
@@ -39,6 +39,8 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland',
 FILES_${PN}-dbg += "${libdir}/clutter/examples/.debug"
 FILES_${PN}-examples = "${libdir}/clutter/examples"
 
+FILES_${PN}-dbg += "${libexecdir}/installed-tests/.debug"
+
 do_configure_prepend() {
        # see https://bugzilla.gnome.org/show_bug.cgi?id=661128 for this
        touch -t 200001010000 ${S}/po/clutter-1.0.pot
diff --git a/meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch b/meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch
new file mode 100644 (file)
index 0000000..80acab8
--- /dev/null
@@ -0,0 +1,20 @@
+Configure output from installed-tests to be TAP compliant, such that gnome-desktop-testing-runner properly interprets the results.
+
+Upstream-status: Pending
+
+Signed-off-by: Tim Orling <TicoTimo@gmail.com>
+
+Index: clutter-1.20.0/build/autotools/glib-tap.mk
+===================================================================
+--- clutter-1.20.0.orig/build/autotools/glib-tap.mk
++++ clutter-1.20.0/build/autotools/glib-tap.mk
+@@ -128,7 +128,8 @@ installed_test_meta_DATA = $(installed_t
+       $(AM_V_GEN) (echo '[Test]' > $@.tmp; \
+       echo 'Type=session' >> $@.tmp; \
+       echo 'TestEnvironment=G_ENABLE_DIAGNOSTIC=0;CLUTTER_ENABLE_DIAGNOSTIC=0;' >> $@.tmp; \
+-      echo 'Exec=$(installed_testdir)/$<' >> $@.tmp; \
++      echo 'Exec=$(installed_testdir)/$< --tap' >> $@.tmp; \
++      echo 'Output=TAP' >> $@.tmp; \
+       mv $@.tmp $@)
+ CLEANFILES += $(installed_test_meta_DATA)
diff --git a/meta/recipes-graphics/clutter/clutter-1.0/run-ptest b/meta/recipes-graphics/clutter/clutter-1.0/run-ptest
new file mode 100644 (file)
index 0000000..98877e5
--- /dev/null
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+gnome-desktop-testing-runner clutter
index 78988101315922b96d602858eb646040bd9604d6..5f39a3a8acf1e41d013dd43d3264ce7719ffa5c7 100644 (file)
@@ -5,4 +5,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 SRC_URI[archive.md5sum] = "a8a33a57a944c6d7c7c013ce9aa3222b"
 SRC_URI[archive.sha256sum] = "cc940809e6e1469ce349c4bddb0cbcc2c13c087d4fc15cda9278d855ee2d1293"
 
-SRC_URI += "file://install-examples.patch"
+SRC_URI += "file://install-examples.patch \
+            file://run-installed-tests-with-tap-output.patch \
+            file://run-ptest"