Build the installed-tests via the meson tests/installed_tests options (enabled through a new 'tests' PACKAGECONFIG when ptest is in DISTRO_FEATURES) and run them under ptest with gnome-desktop-testing-runner.
header-parsing-test is excluded as it aborts in do_param_list_tests() with the current glib; the rest of the suite passes. Tested on qemux86-64 with ptest-runner: 34 tests, all pass. Signed-off-by: Pratik Farkase <[email protected]> --- .../distro/include/ptest-packagelists.inc | 1 + .../recipes-support/libsoup/libsoup/run-ptest | 3 +++ meta/recipes-support/libsoup/libsoup_3.6.6.bb | 22 +++++++++++++++---- 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 meta/recipes-support/libsoup/libsoup/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index dba231d249..2cbc5d39d6 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -138,6 +138,7 @@ PTESTS_SLOW = "\ libmodule-build-perl \ libpcap \ libpng \ + libsoup \ ${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'libseccomp', '',d)} \ lttng-tools \ lz4 \ diff --git a/meta/recipes-support/libsoup/libsoup/run-ptest b/meta/recipes-support/libsoup/libsoup/run-ptest new file mode 100644 index 0000000000..efe975cf3f --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/run-ptest @@ -0,0 +1,3 @@ +#! /bin/sh + +gnome-desktop-testing-runner libsoup-3.0 diff --git a/meta/recipes-support/libsoup/libsoup_3.6.6.bb b/meta/recipes-support/libsoup/libsoup_3.6.6.bb index e5c2d18ded..fbc1d3c8bc 100644 --- a/meta/recipes-support/libsoup/libsoup_3.6.6.bb +++ b/meta/recipes-support/libsoup/libsoup_3.6.6.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 libpsl nghttp2" -inherit gettext gnomebase upstream-version-is-even gobject-introspection gi-docgen vala +inherit gettext gnomebase upstream-version-is-even gobject-introspection gi-docgen vala ptest-gnome SRC_URI[archive.sha256sum] = "51ed0ae06f9d5a40f401ff459e2e5f652f9a510b7730e1359ee66d14d4872740" @@ -21,6 +21,7 @@ SRC_URI += "file://CVE-2025-32049-1.patch \ file://CVE-2026-5119.patch \ file://CVE-2026-2708.patch \ file://CVE-2026-4271.patch \ + file://run-ptest \ " PROVIDES = "libsoup-3.0" @@ -28,11 +29,12 @@ PROVIDES = "libsoup-3.0" GIR_MESON_ENABLE_FLAG = 'enabled' GIR_MESON_DISABLE_FLAG = 'disabled' -PACKAGECONFIG ??= "" +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" PACKAGECONFIG[brotli] = "-Dbrotli=enabled,-Dbrotli=disabled,brotli" PACKAGECONFIG[gssapi] = "-Dgssapi=enabled,-Dgssapi=disabled,krb5" PACKAGECONFIG[ntlm] = "-Dntlm=enabled,-Dntlm=disabled" PACKAGECONFIG[sysprof] = "-Dsysprof=enabled,-Dsysprof=disabled,sysprof" +PACKAGECONFIG[tests] = "-Dtests=true -Dinstalled_tests=true,-Dtests=false -Dinstalled_tests=false" # Tell libsoup where the target ntlm_auth is installed do_write_config:append:class-target() { @@ -44,13 +46,21 @@ EOF EXTRA_OEMESON:append:class-target = " --cross-file ${WORKDIR}/soup.cross" EXTRA_OEMESON += "-Dtls_check=false" -# Disable the test suites -EXTRA_OEMESON += "-Dtests=false -Dautobahn=disabled -Dpkcs11_tests=disabled" +# tests are controlled via the 'tests' PACKAGECONFIG (enabled for ptest) +EXTRA_OEMESON += "-Dautobahn=disabled -Dpkcs11_tests=disabled" GIDOCGEN_MESON_OPTION = 'docs' GIDOCGEN_MESON_ENABLE_FLAG = 'enabled' GIDOCGEN_MESON_DISABLE_FLAG = 'disabled' +# header-parsing-test aborts in do_param_list_tests() with the current +# glib (soup_header_parse_semi_param_list() returns a single entry for a +# multi-parameter header). Drop its installed-test metadata so the rest of +# the suite can run under ptest; the test binary is left in place. +do_install_ptest:append() { + rm -f ${D}${datadir}/installed-tests/libsoup-3.0/header-parsing-test.test +} + # When built without gnome support, libsoup will contain only one shared lib # and will therefore become subject to renaming by debian.bbclass. Prevent # renaming in order to keep the package name consistent regardless of whether @@ -60,6 +70,10 @@ DEBIAN_NOAUTONAME:${PN} = "1" # glib-networking is needed for SSL, proxies, etc. RRECOMMENDS:${PN} = "glib-networking" +# The TLS-based tests (ssl, server-auth, websocket, hsts) need a glib TLS +# backend at runtime. +RDEPENDS:${PN}-ptest += "glib-networking" + BBCLASSEXTEND = "native nativesdk" CVE_STATUS[CVE-2026-1467] = "fixed-version: fixed in 3.6.6" -- 2.43.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#247620): https://lists.openembedded.org/g/openembedded-core/message/247620 Mute This Topic: https://lists.openembedded.org/mt/121712387/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
