alsa-lib: Enabling ptest for alsa-lib component
PATCH 1/1 alsa-lib: Enabling ptest for alsa-lib component
From: Zahir Hussain <[email protected]>
This change adds ptest for alsa-lib.
1) Adding CFLAGS change for include the header file path for resolving below compilation issue;
In file included from ../../../alsa-lib-1.2.1.2/test/lsb/config.c:4:
../../../alsa-lib-1.2.1.2/test/lsb/test.h:5:10: fatal error:
alsa/asoundlib.h: No such file or directory
5 | #include <alsa/asoundlib.h>
2) Removed the test suite execution 'make' call using 'sed' command.
3) Compiled the test directory source code using "oe_runmake check" command.
4) Copied all the required binaries into PTEST path using do_install_ptest() function.
--- .../distro/include/ptest-packagelists.inc | 1 + .../alsa/alsa-lib_1.2.6.1.bb | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+)
meta/conf/distro/include/ptest-packagelists.inc +1 -0
@@ -5,6 +5,7 @@ # PTESTS_FAST = "\ acl-ptest \ + alsa-lib-ptest \ apr-ptest \ apr-util-ptest \ attr-ptest \
meta/recipes-multimedia/alsa/alsa-lib_1.2.6.1.bb +19 -0
@@ -42,3 +42,22 @@ RREPLACES:alsa-conf = "alsa-conf-base" RCONFLICTS:alsa-conf = "alsa-conf-base" BBCLASSEXTEND = "native nativesdk" + +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 +}
Signature · 1 line
2.17.1
Hi Zahir
Quoted 13 lines · On 12/22/23 at 07:06, aszh07 wrote:
From: Zahir Hussain <[email protected]>
This change adds ptest for alsa-lib.
1) Adding CFLAGS change for include the header file path for resolving below compilation issue;
In file included from../../../alsa-lib-1.2.1.2/test/lsb/config.c:4:
../../../alsa-lib-1.2.1.2/test/lsb/test.h:5:10: fatal error:
alsa/asoundlib.h: No such file or directory
5 | #include <alsa/asoundlib.h>2) Removed the test suite execution 'make' call using 'sed' command.
Quoted 7 lines
3) Compiled the test directory source code using "
oe_runmakecheck" command.4) Copied all the required binaries into PTEST path using
do_install_ptest()function.Signed-off-by aszh07 <[email protected]>Signed-off-by Zahir Hussain <[email protected]>
Apologies for the late reply. Would you be interested in submitting a new version against master? I'll be happy to test and review it, as indeed we're missing ptests for alsa-lib and alsa-utils (see https://gist.github.com/ycongal-smile/dd51b0e450a8f0083e9d5cc10eeeb060#file-unimplemented-ptests_oe-core-log).
Thanks in advance
Cheers
Michael.
Signature · 3 lines
Michael Opdenacker, Bootlin Embedded Linux and Kernel engineering https://bootlin.com