gupnp: add ptest support

It takes almost 50 seconds on my machine to execute.

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-12-02 21:44:05 +01:00 committed by Khem Raj
parent dd108a46f8
commit e7878d69ab
No known key found for this signature in database
GPG Key ID: BB053355919D3314
3 changed files with 26 additions and 1 deletions

View File

@ -12,6 +12,7 @@ PTESTS_FAST_META_MULTIMEDIA = "\
"
PTESTS_SLOW_META_MULTIMEDIA = "\
gupnp \
"
PTESTS_PROBLEMS_META_MULTIMEDIA = "\

View File

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

View File

@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
DEPENDS = "e2fsprogs gssdp libsoup-3.0 libxml2"
inherit gnomebase pkgconfig vala gobject-introspection
inherit gnomebase pkgconfig vala gobject-introspection ptest
SRC_URI += "file://run-ptest"
SRC_URI[archive.sha256sum] = "2edb6ee3613558e62f538735368aee27151b7e09d4e2e2c51606833da801869b"
SYSROOT_PREPROCESS_FUNCS += "gupnp_sysroot_preprocess"
@ -18,3 +19,14 @@ gupnp_sysroot_preprocess () {
FILES:${PN}-dev += "${bindir}/gupnp-binding-tool*"
RDEPENDS:${PN}-dev += "python3-core 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/
}