@@ -5,6 +5,7 @@
#
PTESTS_FAST = "\
acl \
+ alsa-lib \
apr-util \
attr \
babeltrace \
new file mode 100644
@@ -0,0 +1,27 @@
+From 4afdc83b4069a4505c5928577321eef8097e5258 Mon Sep 17 00:00:00 2001
+From: Zahir Hussain <zahir.basha@kpit.com>
+Date: Mon, 11 Nov 2024 22:08:33 +0530
+Subject: [PATCH] remove check_TESTS from automake
+
+Upstream-Status: Inappropriate [Project-Specific]
+
+Signed-off-by: Zahir Hussain <zahir.basha@kpit.com>
+---
+ test/lsb/Makefile.am | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/test/lsb/Makefile.am b/test/lsb/Makefile.am
+index ceb4d71..c537bf0 100644
+--- a/test/lsb/Makefile.am
++++ b/test/lsb/Makefile.am
+@@ -1,6 +1,4 @@
+-TESTS = config
+-TESTS += midi_event
+-check_PROGRAMS = $(TESTS)
++check_PROGRAMS = config midi_event
+ noinst_HEADERS = test.h
+
+ AM_CFLAGS = -Wall -pipe
+--
+2.25.1
+
new file mode 100644
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -eux
+
+for t in *; do
+ if [ -f "$t" ] && [ -x "$t" ] && [ "$t" != "run-ptest" ]; then
+ if "./$t" > "alsa-lib_$t.log" 2>&1; then
+ echo "PASS: $t"
+ else
+ echo "FAIL: $t - Log"
+ cat "alsa-lib_$t.log"
+ fi
+ else
+ echo "SKIP: $t (Not executable or not a file)"
+ fi
+done
+
@@ -9,10 +9,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \
file://src/socket.c;md5=285675b45e83f571c6a957fe4ab79c93;beginline=9;endline=24 \
"
-SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2"
+SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2 \
+ file://run-ptest \
+ file://0001-remove-check_TESTS-from-automake.patch \
+ "
SRC_URI[sha256sum] = "4868cd908627279da5a634f468701625be8cc251d84262c7e5b6a218391ad0d2"
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
EXTRA_OECONF += " \
${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \
@@ -42,3 +45,12 @@ RREPLACES:alsa-conf = "alsa-conf-base"
RCONFLICTS:alsa-conf = "alsa-conf-base"
BBCLASSEXTEND = "native nativesdk"
+
+do_compile_ptest() {
+ oe_runmake check
+}
+
+do_install_ptest:append() {
+ install -m 0755 ${B}/test/.libs/* "${D}${PTEST_PATH}";
+ install -m 0755 ${B}/test/lsb/.libs/* "${D}${PTEST_PATH}";
+}
These changes enable ptest for alsa-lib. 1) Removes the test suite execution 'make check-TESTS' call using patch file. 2) Compiled the test directory source code using "oe_runmake check" command. 3) Copied all the required binaries into PTEST_PATH using do_install_ptest() function. runqemu test result: 10/19 binaries are failing due to not getting PCM device handle. those are, chmap, midiloop, pcm-multi-thread, timer, user-ctl-element-set, audio_time, pcm_min, queue_timer, playmidi, oldapi. Below 9 binaries are passed on runqemu ptest, config, midi_event, rawmidi, control, pcm, client_event_filter,latency,namehint,seq Signed-off-by: aszh07 <mail2szahir@gmail.com> --- .../distro/include/ptest-packagelists.inc | 1 + ...001-remove-check_TESTS-from-automake.patch | 27 +++++++++++++++++++ .../alsa/alsa-lib/run-ptest | 17 ++++++++++++ .../alsa/alsa-lib_1.2.12.bb | 16 +++++++++-- 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/0001-remove-check_TESTS-from-automake.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/run-ptest