@@ -5,6 +5,7 @@
#
PTESTS_FAST = "\
acl \
+ alsa-lib \
apr-util \
attr \
babeltrace \
new file mode 100644
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -eux
+
+for t in config control midi_event client_event_filter
+do
+ if "./$t" > "alsa-lib_$t.log" 2>&1
+ then
+ echo "PASS: $t"
+ else
+ echo "FAIL: $t"
+ cat "alsa-lib_$t.log"
+ fi
+ rm "alsa-lib_$t.log"
+done
@@ -12,10 +12,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \
SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2 \
file://0001-topology-correct-version-script-path.patch \
file://CVE-2026-25068.patch \
+ file://run-ptest \
"
SRC_URI[sha256sum] = "9f3f2f69b995f9ad37359072fbc69a3a88bfba081fc83e9be30e14662795bb4d"
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
EXTRA_OECONF += " \
${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \
@@ -31,6 +32,25 @@ FILES:libatopology = "${libdir}/libatopology.so.*"
RDEPENDS:${PN}:class-target = "alsa-conf alsa-ucm-conf"
RDEPENDS:libatopology:class-target = "alsa-topology-conf"
+EXTRA_OEMAKE:append = " AM_CPPFLAGS=-I${S}/include"
+
+do_compile:append() {
+ sed -i 's/^.*$(MAKE) $(AM_MAKEFLAGS) check-TESTS.*$/ /' ${S}/test/lsb/Makefile.in
+ oe_runmake check
+}
+
+do_install_ptest:append() {
+ for f in control client_event_filter namehint
+ do
+ install -m 0755 "${B}/test/.libs/$f" "${D}${PTEST_PATH}";
+ done
+
+ for f in config midi_event
+ do
+ install -m 0755 "${B}/test/lsb/.libs/$f" "${D}${PTEST_PATH}";
+ done
+}
+
# upgrade path
RPROVIDES:${PN} = "libasound"
RREPLACES:${PN} = "libasound"