Message ID | 20230801133833.96667-1-ppjadhav456@gmail.com |
---|---|
State | New |
Headers | show |
Series | [master] alsa-lib: Add ptest | expand |
This doesn't address the points I raised previously. So it's still a no. Alex On Tue, 1 Aug 2023 at 15:39, Poonam Jadhav <ppjadhav456@gmail.com> wrote: > > From: Poonam Jadhav <poonam.jadhav@kpit.com> > > 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 > 5.namehint > > Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com> > --- > .../distro/include/ptest-packagelists.inc | 1 + > .../alsa/alsa-lib/run-ptest | 14 ++++++++++++ > .../recipes-multimedia/alsa/alsa-lib_1.2.9.bb | 22 +++++++++++++++++-- > 3 files changed, 35 insertions(+), 2 deletions(-) > create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/run-ptest > > diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc > index 6250cf081e..99f09132ae 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/run-ptest b/meta/recipes-multimedia/alsa/alsa-lib/run-ptest > new file mode 100644 > index 0000000000..8fbf9f140a > --- /dev/null > +++ b/meta/recipes-multimedia/alsa/alsa-lib/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 > diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb > index d482e27683..8dcd7c4448 100644 > --- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb > +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.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] = "dc9c643fdc4ccfd0572cc685858dd41e08afb583f30460b317e4188275f615b2" > > -inherit autotools pkgconfig > +inherit autotools pkgconfig ptest > > EXTRA_OECONF += " \ > ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \ > @@ -42,3 +44,19 @@ RREPLACES:alsa-conf = "alsa-conf-base" > RCONFLICTS:alsa-conf = "alsa-conf-base" > > BBCLASSEXTEND = "native nativesdk" > + > +do_compile:append() { > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/lsb/config.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o config > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/control.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o control > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/client_event"_filter.c -I "${S}/include" -L "${B}/src/.libs/" -lasound -o client_event_filter > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/namehint.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o namehint > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/lsb/midi_event.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o midi_event > +} > + > +do_install_ptest:append() { > + install -m 0755 "${B}/config" "${D}${PTEST_PATH}" > + install -m 0755 "${B}/control" "${D}${PTEST_PATH}" > + install -m 0755 "${B}/client_event_filter" "${D}${PTEST_PATH}" > + install -m 0755 "${B}/midi_event" "${D}${PTEST_PATH}" > + install -m 0755 "${B}/namehint" "${D}${PTEST_PATH}" > +} > -- > 2.25.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#185246): https://lists.openembedded.org/g/openembedded-core/message/185246 > Mute This Topic: https://lists.openembedded.org/mt/100483753/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On 8/1/23 6:38 AM, Poonam Jadhav wrote: > From: Poonam Jadhav <poonam.jadhav@kpit.com> > > 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 > 5.namehint > > Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com> > --- > .../distro/include/ptest-packagelists.inc | 1 + > .../alsa/alsa-lib/run-ptest | 14 ++++++++++++ > .../recipes-multimedia/alsa/alsa-lib_1.2.9.bb | 22 +++++++++++++++++-- > 3 files changed, 35 insertions(+), 2 deletions(-) > create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/run-ptest > > diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc > index 6250cf081e..99f09132ae 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/run-ptest b/meta/recipes-multimedia/alsa/alsa-lib/run-ptest > new file mode 100644 > index 0000000000..8fbf9f140a > --- /dev/null > +++ b/meta/recipes-multimedia/alsa/alsa-lib/run-ptest > @@ -0,0 +1,14 @@ > +#!/bin/sh > +set -eux > + > +for t in config control midi_event client_event_filter client_event_filter It will be good to derive this list from the sources so it remains in sync with future additions/deletions. > +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 > diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb > index d482e27683..8dcd7c4448 100644 > --- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb > +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.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] = "dc9c643fdc4ccfd0572cc685858dd41e08afb583f30460b317e4188275f615b2" > > -inherit autotools pkgconfig > +inherit autotools pkgconfig ptest > > EXTRA_OECONF += " \ > ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \ > @@ -42,3 +44,19 @@ RREPLACES:alsa-conf = "alsa-conf-base" > RCONFLICTS:alsa-conf = "alsa-conf-base" > > BBCLASSEXTEND = "native nativesdk" > + > +do_compile:append() { > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/lsb/config.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o config > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/control.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o control > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/client_event"_filter.c -I "${S}/include" -L "${B}/src/.libs/" -lasound -o client_event_filter > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/namehint.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o namehint > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/lsb/midi_event.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o midi_event > +} > + > +do_install_ptest:append() { > + install -m 0755 "${B}/config" "${D}${PTEST_PATH}" > + install -m 0755 "${B}/control" "${D}${PTEST_PATH}" > + install -m 0755 "${B}/client_event_filter" "${D}${PTEST_PATH}" > + install -m 0755 "${B}/midi_event" "${D}${PTEST_PATH}" > + install -m 0755 "${B}/namehint" "${D}${PTEST_PATH}" > +} > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#185246): https://lists.openembedded.org/g/openembedded-core/message/185246 > Mute This Topic: https://lists.openembedded.org/mt/100483753/1997914 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
The actual list is defined in the makefile: https://github.com/alsa-project/alsa-lib/blob/master/test/Makefile.am I had asked why the patch builds and runs only a hardcoded subset, but got no response. Also the need for doing this as a ptest should be justified to begin with. Alex On Tue, 1 Aug 2023 at 18:50, Khem Raj <raj.khem@gmail.com> wrote: > > On 8/1/23 6:38 AM, Poonam Jadhav wrote: > > From: Poonam Jadhav <poonam.jadhav@kpit.com> > > > > 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 > > 5.namehint > > > > Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com> > > --- > > .../distro/include/ptest-packagelists.inc | 1 + > > .../alsa/alsa-lib/run-ptest | 14 ++++++++++++ > > .../recipes-multimedia/alsa/alsa-lib_1.2.9.bb | 22 +++++++++++++++++-- > > 3 files changed, 35 insertions(+), 2 deletions(-) > > create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/run-ptest > > > > diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc > > index 6250cf081e..99f09132ae 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/run-ptest b/meta/recipes-multimedia/alsa/alsa-lib/run-ptest > > new file mode 100644 > > index 0000000000..8fbf9f140a > > --- /dev/null > > +++ b/meta/recipes-multimedia/alsa/alsa-lib/run-ptest > > @@ -0,0 +1,14 @@ > > +#!/bin/sh > > +set -eux > > + > > +for t in config control midi_event client_event_filter client_event_filter > > It will be good to derive this list from the sources so it remains in > sync with future additions/deletions. > > > +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 > > diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb > > index d482e27683..8dcd7c4448 100644 > > --- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb > > +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.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] = "dc9c643fdc4ccfd0572cc685858dd41e08afb583f30460b317e4188275f615b2" > > > > -inherit autotools pkgconfig > > +inherit autotools pkgconfig ptest > > > > EXTRA_OECONF += " \ > > ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \ > > @@ -42,3 +44,19 @@ RREPLACES:alsa-conf = "alsa-conf-base" > > RCONFLICTS:alsa-conf = "alsa-conf-base" > > > > BBCLASSEXTEND = "native nativesdk" > > + > > +do_compile:append() { > > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/lsb/config.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o config > > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/control.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o control > > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/client_event"_filter.c -I "${S}/include" -L "${B}/src/.libs/" -lasound -o client_event_filter > > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/namehint.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o namehint > > + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/lsb/midi_event.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o midi_event > > +} > > + > > +do_install_ptest:append() { > > + install -m 0755 "${B}/config" "${D}${PTEST_PATH}" > > + install -m 0755 "${B}/control" "${D}${PTEST_PATH}" > > + install -m 0755 "${B}/client_event_filter" "${D}${PTEST_PATH}" > > + install -m 0755 "${B}/midi_event" "${D}${PTEST_PATH}" > > + install -m 0755 "${B}/namehint" "${D}${PTEST_PATH}" > > +} > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#185359): https://lists.openembedded.org/g/openembedded-core/message/185359 > Mute This Topic: https://lists.openembedded.org/mt/100483753/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 6250cf081e..99f09132ae 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/run-ptest b/meta/recipes-multimedia/alsa/alsa-lib/run-ptest new file mode 100644 index 0000000000..8fbf9f140a --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib/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 diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb index d482e27683..8dcd7c4448 100644 --- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.bb +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.9.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] = "dc9c643fdc4ccfd0572cc685858dd41e08afb583f30460b317e4188275f615b2" -inherit autotools pkgconfig +inherit autotools pkgconfig ptest EXTRA_OECONF += " \ ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \ @@ -42,3 +44,19 @@ RREPLACES:alsa-conf = "alsa-conf-base" RCONFLICTS:alsa-conf = "alsa-conf-base" BBCLASSEXTEND = "native nativesdk" + +do_compile:append() { + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/lsb/config.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o config + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/control.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o control + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/client_event"_filter.c -I "${S}/include" -L "${B}/src/.libs/" -lasound -o client_event_filter + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/namehint.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o namehint + ${CC} ${CFLAGS} ${LDFLAGS} "${S}/test/lsb/midi_event.c" -I "${S}/include" -L "${B}/src/.libs/" -lasound -o midi_event +} + +do_install_ptest:append() { + install -m 0755 "${B}/config" "${D}${PTEST_PATH}" + install -m 0755 "${B}/control" "${D}${PTEST_PATH}" + install -m 0755 "${B}/client_event_filter" "${D}${PTEST_PATH}" + install -m 0755 "${B}/midi_event" "${D}${PTEST_PATH}" + install -m 0755 "${B}/namehint" "${D}${PTEST_PATH}" +}