diff --git a/meta-oe/recipes-support/libmanette/libmanette/run-ptest b/meta-oe/recipes-support/libmanette/libmanette/run-ptest new file mode 100644 index 0000000000..3c937825d1 --- /dev/null +++ b/meta-oe/recipes-support/libmanette/libmanette/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh +if [ -d /usr/libexec/installed-tests/manette-0.2 ]; then + cd /usr/libexec/installed-tests/manette-0.2 + for t in ./*; do + $t && echo PASS: $t || echo FAIL: $t + done + cd - +else + echo FAIL: no tests found +fi diff --git a/meta-oe/recipes-support/libmanette/libmanette_0.2.13.bb b/meta-oe/recipes-support/libmanette/libmanette_0.2.13.bb index 2825b8af98..ce12760f54 100644 --- a/meta-oe/recipes-support/libmanette/libmanette_0.2.13.bb +++ b/meta-oe/recipes-support/libmanette/libmanette_0.2.13.bb @@ -7,10 +7,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" DEPENDS = "libevdev libgudev hidapi" -SRC_URI = "https://download.gnome.org/sources/libmanette/0.2/libmanette-${PV}.tar.xz" +SRC_URI = "https://download.gnome.org/sources/libmanette/0.2/libmanette-${PV}.tar.xz \ + file://run-ptest" SRC_URI[sha256sum] = "287cc2fde0de092919366af757d85e7b3a0248eb1b395344726e97955a77d8ae" inherit meson pkgconfig gobject-introspection ptest vala -FILES:${PN}-ptest =+ "${bindir}/manette-test" FILES:${PN}-dev =+ "${libdir}/girepository-1.0" +FILES:${PN}-ptest += "${libexecdir}/installed-tests" + +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'test', '', d)}" +PACKAGECONFIG[test] = "-Dbuild-tests=true -Dinstall-tests=true,-Dbuild-tests=false -Dinstall-tests=false"