new file mode 100644
@@ -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
@@ -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/
+}