libmanette: fix ptests

The original content of the ptest package, manette-test, is a helper demo
application (like evtest), and not a test suite. Also, the recipe did not
provide a run-ptest script.

Fix it by installing the actual tests, and adding a run-ptest script.

Note that the test folder structure looks like a gnome desktop test suite
(and the application is under the gnome umbrella), however the project
doesn't provide all necessary scaffolding for gnome-desktop-test to work, so
the tests are executed directly from the run-ptest script.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Gyorgy Sarvari 2025-10-17 22:25:55 +02:00 committed by Khem Raj
parent c26c858340
commit 1559130d37
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 16 additions and 2 deletions

View File

@ -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

View File

@ -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"