gssdp: add ptest support
PATCH 1/4 gssdp: add ptest support
It is quick, it finished under 20 seconds on my machine.
Signed-off-by Gyorgy Sarvari <[email protected]>
Signed-off-by Khem Raj <[email protected]>
(cherry picked from commit 27865a96d576160a0e3a0fda6b7e604f19edbc6c)
Adapted to Kirkstone
Signed-off-by Gyorgy Sarvari <[email protected]>
--- .../recipes-connectivity/gupnp/gssdp/run-ptest | 12 ++++++++++++ .../recipes-connectivity/gupnp/gssdp_1.4.0.1.bb | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 meta-multimedia/recipes-connectivity/gupnp/gssdp/run-ptest
meta-multimedia/recipes-connectivity/gupnp/gssdp/run-ptest new file +12 -0
@@ -0,0 +1,12 @@ +#!/bin/sh +RET=0 +cd tests +for t in *; do + if ./$t; then + echo PASS: $t + else + echo FAIL: $t + RET=1 + fi +done +exit $RET
meta-multimedia/recipes-connectivity/gupnp/gssdp_1.4.0.1.bb +8 -1
@@ -7,6 +7,7 @@ LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" SRC_URI = "${GNOME_MIRROR}/${BPN}/1.4/${BPN}-${PV}.tar.xz" +SRC_URI += "file://run-ptest" SRC_URI[sha256sum] = "8676849d57fb822b8728856dbadebf3867f89ee47a0ec47a20045d011f431582" GTKDOC_MESON_OPTION = 'gtk_doc'
@@ -16,7 +17,7 @@ DEPENDS = " \ libsoup-2.4 \ " -inherit meson pkgconfig gobject-introspection vala gtk-doc features_check +inherit meson pkgconfig gobject-introspection vala gtk-doc features_check ptest SNIFFER = "${@bb.utils.contains("BBFILE_COLLECTIONS", "gnome-layer", "sniffer", "", d)}"
@@ -28,4 +29,10 @@ REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'sniffer', 'op PACKAGES =+ "gssdp-tools" +do_install_ptest(){ + install -d ${D}${PTEST_PATH}/tests + find ${B}/tests -type f -executable -exec install {} ${D}${PTEST_PATH}/tests \; +} + FILES:gssdp-tools = "${bindir}/gssdp* ${datadir}/gssdp/*.glade" +
PATCH 2/4 gupnp: add ptest support
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
meta-multimedia/recipes-connectivity/gupnp/gupnp/run-ptest new file +12 -0
@@ -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
meta-multimedia/recipes-connectivity/gupnp/gupnp_1.4.1.bb +13 -1
@@ -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/ +}
PATCH 3/4 gupnp-av: add ptest support
In reply to Gyorgy SarvariIt 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)
Adapted to Kirkstone.
Signed-off-by Gyorgy Sarvari <[email protected]>
--- .../gupnp/gupnp-av/run-ptest | 12 +++++++++++ .../gupnp/gupnp-av_0.14.0.bb | 21 +++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 meta-multimedia/recipes-connectivity/gupnp/gupnp-av/run-ptest
meta-multimedia/recipes-connectivity/gupnp/gupnp-av/run-ptest new file +12 -0
@@ -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
meta-multimedia/recipes-connectivity/gupnp/gupnp-av_0.14.0.bb +19 -2
@@ -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 +}
PATCH 4/4 gupnp-igd: add ptest support
In reply to Gyorgy SarvariExecution takes around 10 seconds.
Signed-off-by Gyorgy Sarvari <[email protected]>
--- .../recipes-connectivity/gupnp/gupnp-igd/run-ptest | 13 +++++++++++++ .../recipes-connectivity/gupnp/gupnp-igd_1.2.0.bb | 11 ++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 meta-multimedia/recipes-connectivity/gupnp/gupnp-igd/run-ptest
meta-multimedia/recipes-connectivity/gupnp/gupnp-igd/run-ptest new file +13 -0
@@ -0,0 +1,13 @@ +#!/bin/sh +RET=0 + +cd test +for t in $(find . -type f -executable); do + if ./$t; then + echo PASS: $t + else + echo FAIL: $t + RET=1 + fi +done +exit $RET
meta-multimedia/recipes-connectivity/gupnp/gupnp-igd_1.2.0.bb +10 -1
@@ -6,8 +6,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ DEPENDS = "glib-2.0 gssdp gupnp sqlite3" SRC_URI = "http://download.gnome.org/sources/${BPN}/1.2/${BPN}-${PV}.tar.xz" +SRC_URI += "file://run-ptest" SRC_URI[sha256sum] = "4b5120098aa13edd27818ba9ee4d7fe961bf540bf50d056ff703c61545e02be1" GTKDOC_MESON_OPTION = "gtk_doc" -inherit meson pkgconfig gtk-doc gobject-introspection +inherit meson pkgconfig gtk-doc gobject-introspection ptest + +do_install_ptest(){ + cd ${B}/tests/gtest + for t in $(find . -type f -executable); do + install -D $t ${D}${PTEST_PATH}/test/$t + done + install -m 0644 ${S}/tests/gtest/*.xml ${D}${PTEST_PATH}/test/ +}