From b833fdc421997ac124f23f8dffc9f70c34bc15ad Mon Sep 17 00:00:00 2001 From: Gyorgy Sarvari Date: Sat, 18 Oct 2025 09:04:44 +0200 Subject: [PATCH] libxml++-5.0: fix ptests The recipe inherits the ptest class, however installs no tests nor run-ptest script. This change rectifies this. Signed-off-by: Gyorgy Sarvari Signed-off-by: Khem Raj --- meta-oe/recipes-core/libxml/libxml++-5.0/run-ptest | 4 ++++ meta-oe/recipes-core/libxml/libxml++-5.0_5.4.0.bb | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 meta-oe/recipes-core/libxml/libxml++-5.0/run-ptest diff --git a/meta-oe/recipes-core/libxml/libxml++-5.0/run-ptest b/meta-oe/recipes-core/libxml/libxml++-5.0/run-ptest new file mode 100644 index 0000000000..4f54f90e09 --- /dev/null +++ b/meta-oe/recipes-core/libxml/libxml++-5.0/run-ptest @@ -0,0 +1,4 @@ +#!/bin/sh +for t in `ls ./*_test`; do + $t && echo PASS: $t || echo FAIL: $t +done diff --git a/meta-oe/recipes-core/libxml/libxml++-5.0_5.4.0.bb b/meta-oe/recipes-core/libxml/libxml++-5.0_5.4.0.bb index e4fdac2c2c..cd16ec862f 100644 --- a/meta-oe/recipes-core/libxml/libxml++-5.0_5.4.0.bb +++ b/meta-oe/recipes-core/libxml/libxml++-5.0_5.4.0.bb @@ -11,11 +11,21 @@ DEPENDS = "libxml2 glibmm" GNOMEBN = "libxml++" inherit gnomebase ptest +SRC_URI += "file://run-ptest" S = "${UNPACKDIR}/libxml++-${PV}" SRC_URI[archive.sha256sum] = "e9a23c436686a94698d2138e6bcbaf849121d63bfa0f50dc34fefbfd79566848" UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG[tests] = "-Dbuild-tests=true, -Dbuild-tests=false" + +do_install_ptest(){ + for t in `ls ${B}/tests/*_test`; do + install $t ${D}${PTEST_PATH}/ + done +} + FILES:${PN}-doc += "${datadir}/devhelp" FILES:${PN}-dev += "${libdir}/libxml++-${@gnome_verdir("${PV}")}/include/libxml++config.h"