From: Gyorgy Sarvari <[email protected]>

It takes around a second to execute the suite.

Signed-off-by: Gyorgy Sarvari <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
(cherry picked from commit 65c2f6de55fa662bce0281046ed3f291c414ff82)
Signed-off-by: Ankur Tyagi <[email protected]>
---
 .../ptest-packagelists-meta-multimedia.inc    |  1 +
 .../gupnp/gupnp-av/run-ptest                  | 12 +++++++++++
 .../gupnp/gupnp-av_0.14.4.bb                  | 21 +++++++++++++++++--
 3 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 
meta-multimedia/recipes-connectivity/gupnp/gupnp-av/run-ptest

diff --git 
a/meta-multimedia/conf/include/ptest-packagelists-meta-multimedia.inc 
b/meta-multimedia/conf/include/ptest-packagelists-meta-multimedia.inc
index 081ace6d22..ec10edfb83 100644
--- a/meta-multimedia/conf/include/ptest-packagelists-meta-multimedia.inc
+++ b/meta-multimedia/conf/include/ptest-packagelists-meta-multimedia.inc
@@ -8,6 +8,7 @@
 
 PTESTS_FAST_META_MULTIMEDIA = "\
     gssdp \
+    gupnp-av \
     libopenmpt\
 "
 
diff --git a/meta-multimedia/recipes-connectivity/gupnp/gupnp-av/run-ptest 
b/meta-multimedia/recipes-connectivity/gupnp/gupnp-av/run-ptest
new file mode 100644
index 0000000000..0f7504cd3b
--- /dev/null
+++ b/meta-multimedia/recipes-connectivity/gupnp/gupnp-av/run-ptest
@@ -0,0 +1,12 @@
+#!/bin/sh
+RET=0
+cd tests
+for t in $(find . -type f -executable); 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-av_0.14.4.bb 
b/meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.14.4.bb
index 21f0449762..28e65e1bfa 100644
--- a/meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.14.4.bb
+++ b/meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.14.4.bb
@@ -6,7 +6,24 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
 DEPENDS = "gupnp"
 
-inherit gi-docgen meson pkgconfig gobject-introspection vala
+inherit gi-docgen meson pkgconfig gobject-introspection vala ptest
 
-SRC_URI = "${GNOME_MIRROR}/${BPN}/0.14/${BPN}-${PV}.tar.xz"
+SRC_URI = "${GNOME_MIRROR}/${BPN}/0.14/${BPN}-${PV}.tar.xz \
+           file://run-ptest"
 SRC_URI[sha256sum] = 
"21d974b3275cb5dcf5b8aa1d9a3fc80e7edca706935f6fbd004c79787138f8c7"
+
+do_configure:prepend(){
+    # set ABS_TOP_SRCDIR to ${PTEST_PATH instead of the source-dir on the host}
+    sed -i "s!\(-DABS_TOP_SRCDIR=\"\).*!\1${PTEST_PATH}/tests\"'],!" 
${S}/tests/meson.build
+    # same for DATA_PATH in the other test folder
+    sed -i "s!\(-DDATA_PATH=\"\).*!\1${PTEST_PATH}/tests\"']!" 
${S}/tests/gtest/meson.build
+}
+
+do_install_ptest(){
+    cd ${B}/tests
+    find . -type f -executable -exec install -D {} ${D}${PTEST_PATH}/tests/{} 
\;
+    cp -r ${S}/tests/gtest/data ${D}${PTEST_PATH}/tests
+
+    # this test is not enabled for execution in 0.14.4 in meson.build
+    rm ${D}${PTEST_PATH}/tests/test-search-criteria-parser
+}
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#122594): 
https://lists.openembedded.org/g/openembedded-devel/message/122594
Mute This Topic: https://lists.openembedded.org/mt/116743168/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to