alsa-lib: Add ptest
PATCH 1/1 alsa-lib: Add ptest
From: Sana Kazi <[email protected]>
alsa-lib is a user space library that provides audio and MIDI functionality apis for simplifying application programming and provide higher level functionality
ptest executes below binaries on target:
1.config
2.control
3.client_event_filter
4.midi_event
The following changes are introduced:
- Add the required include path to CFLAGS to resolve:
fatal error: alsa/asoundlib.h: No such file or directory
- Remove the test suite execution "make" call using sed to avoid executing tests during the build.
- Build the test sources using:
oe_runmake check
- Install the generated test binaries through do_install_ptest().
--- .../distro/include/ptest-packagelists.inc | 1 + .../alsa/alsa-lib/run-ptest | 14 ++++++++++++ .../alsa/alsa-lib_1.2.11.bb | 22 ++++++++++++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
@@ -5,6 +5,7 @@ # PTESTS_FAST = "\ acl \ + alsa-lib \ apr-util \ attr \ babeltrace \
meta/recipes-multimedia/alsa/alsa-lib/run-ptest new file +14 -0
@@ -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
meta/recipes-multimedia/alsa/alsa-lib_1.2.11.bb +21 -1
@@ -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"
Signature · 1 line
2.43.0
Quoted 26 lines · Sana Kazi via lists.openembedded.org
From: Sana Kazi <[email protected]>
alsa-lib is a user space library that provides audio and MIDI functionality apis for simplifying application programming and provide higher level functionality
ptest executes below binaries on target:
1.config
2.control
3.client_event_filter
4.midi_eventThe following changes are introduced:
- Add the required include path to CFLAGS to resolve:
fatal error:
alsa/asoundlib.h: No such file or directory- Remove the test suite execution "make" call using sed to avoid executing tests during the build.
- Build the test sources using:
oe_runmakecheck- Install the generated test binaries through
do_install_ptest().
Quoted 7 lines
Signed-off-by Sana Kazi <[email protected]>--- .../distro/include/ptest-packagelists.inc | 1 + .../alsa/alsa-lib/run-ptest | 14 ++++++++++++ .../alsa/alsa-lib_1.2.11.bb | 22 ++++++++++++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/run-ptest
Hello,
I'm sorry but adding ptests is not allowed under the stable policy. I have to reject this.
Regards,
Signature · 2 lines
Yoann Congal Smile ECS
Quoted 2 lines · Yoann Congal via lists.openembedded.org
I'm sorry but adding ptests is not allowed under the stable policy. I have to reject this.
Also, it’s not a backport as it’s not yet in master. Please only submit patches for stable branches once they’ve been integrated into master.
Ross