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.0.bb b/meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.14.0.bb index b253c54d92..e4ffa06355 100644 --- a/meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.14.0.bb +++ b/meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.14.0.bb @@ -6,7 +6,24 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" DEPENDS = "gupnp" -inherit meson pkgconfig gobject-introspection vala +inherit 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] = "20aed546fc882e78a3f186a0c8bce5c841cc3a44b7ea528298fbdc82596fb156" + +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 +}