It takes almost 50 seconds on my machine to execute.

Signed-off-by: Gyorgy Sarvari <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
(cherry picked from commit e7878d69abd4d1cfaad3f5e5ba9cf7ad00f136bd)

Adapted to Kirkstone
Signed-off-by: Gyorgy Sarvari <[email protected]>
---
 .../recipes-connectivity/gupnp/gupnp/run-ptest     | 12 ++++++++++++
 .../recipes-connectivity/gupnp/gupnp_1.4.1.bb      | 14 +++++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 meta-multimedia/recipes-connectivity/gupnp/gupnp/run-ptest

diff --git a/meta-multimedia/recipes-connectivity/gupnp/gupnp/run-ptest 
b/meta-multimedia/recipes-connectivity/gupnp/gupnp/run-ptest
new file mode 100644
index 0000000000..2efcbcb773
--- /dev/null
+++ b/meta-multimedia/recipes-connectivity/gupnp/gupnp/run-ptest
@@ -0,0 +1,12 @@
+#!/bin/sh
+RET=0
+cd tests
+for t in $(find . -type f -executable -maxdepth 1); do
+    if ./$t; then
+        echo PASS: $t
+    else
+        echo FAIL: $t
+        RET=1
+    fi
+done
+exit $RET
diff --git a/meta-multimedia/recipes-connectivity/gupnp/gupnp_1.4.1.bb 
b/meta-multimedia/recipes-connectivity/gupnp/gupnp_1.4.1.bb
index 708e3844ff..553809d9ed 100644
--- a/meta-multimedia/recipes-connectivity/gupnp/gupnp_1.4.1.bb
+++ b/meta-multimedia/recipes-connectivity/gupnp/gupnp_1.4.1.bb
@@ -5,10 +5,11 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
 DEPENDS = "e2fsprogs gssdp libsoup-2.4 libxml2"
 
-inherit meson pkgconfig vala gobject-introspection
+inherit meson pkgconfig vala gobject-introspection ptest
 
 SRC_URI = "${GNOME_MIRROR}/${BPN}/1.4/${BPN}-${PV}.tar.xz"
 SRC_URI[sha256sum] = 
"899196b5e66f03b8e25f046a7a658cd2a6851becb83f2d55345ab3281655dc0c"
+SRC_URI += "file://run-ptest"
 
 SYSROOT_PREPROCESS_FUNCS += "gupnp_sysroot_preprocess"
 
@@ -20,3 +21,14 @@ gupnp_sysroot_preprocess () {
 FILES:${PN}-dev += "${bindir}/gupnp-binding-tool*"
 
 RDEPENDS:${PN}-dev = "python3 python3-xml"
+
+do_configure:prepend(){
+    # change the test-datadir from source-folder to ptest-folder
+    sed -i "s!\(-DDATA_PATH=\"\).*!\1${PTEST_PATH}/tests/data\"',!" 
${S}/tests/meson.build
+}
+
+do_install_ptest(){
+    install -d ${D}${PTEST_PATH}/tests
+    find ${B}/tests -type f -executable -exec install {} 
${D}${PTEST_PATH}/tests/ \;
+    cp -r ${S}/tests/data ${D}${PTEST_PATH}/tests/
+}
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#122364): 
https://lists.openembedded.org/g/openembedded-devel/message/122364
Mute This Topic: https://lists.openembedded.org/mt/116649241/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to