* [OE-core][master][PATCH] alsa-lib: Enabling ptest for alsa-lib component
@ 2024-02-12 13:46 aszh07
2024-02-12 13:56 ` Alexander Kanavin
2024-02-12 14:37 ` Ross Burton
0 siblings, 2 replies; 6+ messages in thread
From: aszh07 @ 2024-02-12 13:46 UTC (permalink / raw)
To: openembedded-core, mail2szahir; +Cc: ranjitsinh.rathod
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.
Signed-off-by: aszh07 <mail2szahir@gmail.com>
---
.../distro/include/ptest-packagelists.inc | 1 +
.../alsa/alsa-lib_1.2.10.bb | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 9057c12b09..78b4920996 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -5,6 +5,7 @@
#
PTESTS_FAST = "\
acl \
+ alsa-lib-ptest \
apr-util \
attr \
babeltrace \
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.10.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.10.bb
index 83bc6877d2..f3a4693a45 100644
--- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.10.bb
+++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.10.bb
@@ -44,3 +44,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
+}
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [OE-core][master][PATCH] alsa-lib: Enabling ptest for alsa-lib component
2024-02-12 13:46 [OE-core][master][PATCH] alsa-lib: Enabling ptest for alsa-lib component aszh07
@ 2024-02-12 13:56 ` Alexander Kanavin
2024-02-12 14:37 ` Ross Burton
1 sibling, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2024-02-12 13:56 UTC (permalink / raw)
To: aszh07; +Cc: openembedded-core, ranjitsinh.rathod
This seems *very* incomplete. How was it tested, and can you show the
output of the test that was performed?
Alex
On Mon, 12 Feb 2024 at 14:47, aszh07 <mail2szahir@gmail.com> wrote:
>
> 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.
>
> Signed-off-by: aszh07 <mail2szahir@gmail.com>
> ---
> .../distro/include/ptest-packagelists.inc | 1 +
> .../alsa/alsa-lib_1.2.10.bb | 19 +++++++++++++++++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
> index 9057c12b09..78b4920996 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -5,6 +5,7 @@
> #
> PTESTS_FAST = "\
> acl \
> + alsa-lib-ptest \
> apr-util \
> attr \
> babeltrace \
> diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.10.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.10.bb
> index 83bc6877d2..f3a4693a45 100644
> --- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.10.bb
> +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.10.bb
> @@ -44,3 +44,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
> +}
> --
> 2.17.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#195320): https://lists.openembedded.org/g/openembedded-core/message/195320
> Mute This Topic: https://lists.openembedded.org/mt/104311177/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [OE-core][master][PATCH] alsa-lib: Enabling ptest for alsa-lib component
2024-02-12 13:46 [OE-core][master][PATCH] alsa-lib: Enabling ptest for alsa-lib component aszh07
2024-02-12 13:56 ` Alexander Kanavin
@ 2024-02-12 14:37 ` Ross Burton
1 sibling, 0 replies; 6+ messages in thread
From: Ross Burton @ 2024-02-12 14:37 UTC (permalink / raw)
To: mail2szahir@gmail.com; +Cc: OE Core mailing list, ranjitsinh.rathod@kpit.com
On 12 Feb 2024, at 13:46, aszh07 via lists.openembedded.org <mail2szahir=gmail.com@lists.openembedded.org> wrote:
> .../distro/include/ptest-packagelists.inc | 1 +
> .../alsa/alsa-lib_1.2.10.bb | 19 +++++++++++++++++++
> 2 files changed, 20 insertions(+)
I don’t see a run-ptest script, which is pretty important for a ptest-enabled package.
> +do_compile:append() {
> + sed -i 's/^.*$(MAKE) $(AM_MAKEFLAGS) check-TESTS.*$/ /' ${S}/test/lsb/Makefile.in
> + oe_runmake check
> +}
We patch automake, so you can just do “oe_runmake buildtest-TESTS” here.
Ross
^ permalink raw reply [flat|nested] 6+ messages in thread
* [OE-core][master][PATCH] alsa-lib: enabling ptest for alsa-lib component
@ 2024-10-16 17:16 aszh07
2024-10-16 17:44 ` Khem Raj
2024-10-16 19:30 ` Alexander Kanavin
0 siblings, 2 replies; 6+ messages in thread
From: aszh07 @ 2024-10-16 17:16 UTC (permalink / raw)
To: openembedded-core, zahir.basha
This change adds ptest for alsa-lib.
1) Removed the test suite execution 'make check-TESTS' call using 'sed' command.
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.
Signed-off-by: aszh07 <mail2szahir@gmail.com>
---
.../distro/include/ptest-packagelists.inc | 1 +
.../alsa/alsa-lib_1.2.12.bb | 23 +++++++++++++++++--
meta/recipes-multimedia/alsa/files/run-ptest | 14 +++++++++++
3 files changed, 36 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-multimedia/alsa/files/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 4a48188562..f0ffe11347 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -5,6 +5,7 @@
#
PTESTS_FAST = "\
acl \
+ alsa-lib \
apr-util \
attr \
babeltrace \
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.12.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.12.bb
index d9136052b7..1aa19dac6d 100644
--- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.12.bb
+++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.12.bb
@@ -9,10 +9,12 @@ 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 \
+ "
SRC_URI[sha256sum] = "4868cd908627279da5a634f468701625be8cc251d84262c7e5b6a218391ad0d2"
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
EXTRA_OECONF += " \
${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \
@@ -42,3 +44,20 @@ RREPLACES:alsa-conf = "alsa-conf-base"
RCONFLICTS:alsa-conf = "alsa-conf-base"
BBCLASSEXTEND = "native nativesdk"
+
+do_compile_ptest() {
+ 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
+}
diff --git a/meta/recipes-multimedia/alsa/files/run-ptest b/meta/recipes-multimedia/alsa/files/run-ptest
new file mode 100644
index 0000000000..8fbf9f140a
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/files/run-ptest
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -eux
+
+for t in config control midi_event client_event_filter 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
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [OE-core][master][PATCH] alsa-lib: enabling ptest for alsa-lib component
2024-10-16 17:16 [OE-core][master][PATCH] alsa-lib: enabling " aszh07
@ 2024-10-16 17:44 ` Khem Raj
2024-10-16 19:30 ` Alexander Kanavin
1 sibling, 0 replies; 6+ messages in thread
From: Khem Raj @ 2024-10-16 17:44 UTC (permalink / raw)
To: mail2szahir; +Cc: openembedded-core, zahir.basha
On Wed, Oct 16, 2024 at 10:17 AM aszh07 via lists.openembedded.org
<mail2szahir=gmail.com@lists.openembedded.org> wrote:
>
> This change adds ptest for alsa-lib.
>
> 1) Removed the test suite execution 'make check-TESTS' call using 'sed' command.
>
> 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.
>
> Signed-off-by: aszh07 <mail2szahir@gmail.com>
> ---
> .../distro/include/ptest-packagelists.inc | 1 +
> .../alsa/alsa-lib_1.2.12.bb | 23 +++++++++++++++++--
> meta/recipes-multimedia/alsa/files/run-ptest | 14 +++++++++++
> 3 files changed, 36 insertions(+), 2 deletions(-)
> create mode 100644 meta/recipes-multimedia/alsa/files/run-ptest
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
> index 4a48188562..f0ffe11347 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -5,6 +5,7 @@
> #
> PTESTS_FAST = "\
> acl \
> + alsa-lib \
> apr-util \
> attr \
> babeltrace \
> diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.12.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.12.bb
> index d9136052b7..1aa19dac6d 100644
> --- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.12.bb
> +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.12.bb
> @@ -9,10 +9,12 @@ 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 \
> + "
> SRC_URI[sha256sum] = "4868cd908627279da5a634f468701625be8cc251d84262c7e5b6a218391ad0d2"
>
> -inherit autotools pkgconfig
> +inherit autotools pkgconfig ptest
>
> EXTRA_OECONF += " \
> ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \
> @@ -42,3 +44,20 @@ RREPLACES:alsa-conf = "alsa-conf-base"
> RCONFLICTS:alsa-conf = "alsa-conf-base"
>
> BBCLASSEXTEND = "native nativesdk"
> +
> +do_compile_ptest() {
> + sed -i 's/^.*$(MAKE) $(AM_MAKEFLAGS) check-TESTS.*$/ /' ${S}/test/lsb/Makefile.in
Can we do this sed operation as a patch and apply it unconditionally,
since it's only editing
tests makefile, it seems harmless for the rest of the component.
> + 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
> +}
> diff --git a/meta/recipes-multimedia/alsa/files/run-ptest b/meta/recipes-multimedia/alsa/files/run-ptest
> new file mode 100644
> index 0000000000..8fbf9f140a
> --- /dev/null
> +++ b/meta/recipes-multimedia/alsa/files/run-ptest
> @@ -0,0 +1,14 @@
> +#!/bin/sh
> +set -eux
> +
> +for t in config control midi_event client_event_filter 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
> --
> 2.17.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#205969): https://lists.openembedded.org/g/openembedded-core/message/205969
> Mute This Topic: https://lists.openembedded.org/mt/109048136/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [OE-core][master][PATCH] alsa-lib: enabling ptest for alsa-lib component
2024-10-16 17:16 [OE-core][master][PATCH] alsa-lib: enabling " aszh07
2024-10-16 17:44 ` Khem Raj
@ 2024-10-16 19:30 ` Alexander Kanavin
1 sibling, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2024-10-16 19:30 UTC (permalink / raw)
To: mail2szahir; +Cc: openembedded-core, zahir.basha
On Wed, 16 Oct 2024 at 19:17, aszh07 via lists.openembedded.org
<mail2szahir=gmail.com@lists.openembedded.org> wrote:
> + 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
Can these be wildcards, or maybe the output of the find command?
Hardcoded lists like these are prone to become outdated and incomplete
on version upgrades.
> +for t in config control midi_event client_event_filter client_event_filter
> +do
> + if "./$t" > "alsa-lib_$t.log" 2>&1
Here you can simply use a wildcard as nothing else is installed. Again
avoids the use of hardcoded lists.
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-10-16 19:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-12 13:46 [OE-core][master][PATCH] alsa-lib: Enabling ptest for alsa-lib component aszh07
2024-02-12 13:56 ` Alexander Kanavin
2024-02-12 14:37 ` Ross Burton
-- strict thread matches above, loose matches on Subject: below --
2024-10-16 17:16 [OE-core][master][PATCH] alsa-lib: enabling " aszh07
2024-10-16 17:44 ` Khem Raj
2024-10-16 19:30 ` Alexander Kanavin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox