alsa-lib: Add ptest
PATCH 1/1 alsa-lib: Add ptest
From: Poonam Jadhav <[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
5.namehint
--- .../distro/include/ptest-packagelists.inc | 1 + .../alsa/alsa-lib/run-ptest | 14 ++++++++++++++ .../alsa/alsa-lib_1.2.1.2.bb | 19 ++++++++++++++++++- 3 files changed, 33 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-ptest \ + alsa-lib-ptest \ apr-ptest \ apr-util-ptest \ attr-ptest \
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 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.1.2.bb +18 -1
@@ -18,11 +18,12 @@ SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2 \ file://0005-ucm-Do-not-fail-to-parse-configs-on-cards-with-an-em.patch \ file://0001-Fix-alsa-sound-.h-for-external-programs.patch \ file://0001-uapi-Move-typedefs-from-uapi-to-sound.patch \ + file://run-ptest \ " SRC_URI[md5sum] = "82ddd3698469beec147e4f4a67134ea0" SRC_URI[sha256sum] = "958e260e3673f1f6ff6b2d2c0df3fc2e469bea5b2957163ce96ce17f23e87943" -inherit autotools pkgconfig +inherit autotools pkgconfig ptest EXTRA_OECONF += " \ ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \
@@ -52,3 +53,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}" +}
Signature · 1 line
2.25.1
What do the tests do, and why they should be run? Are they actually useful to run when assembling a custom distribution, and would they help uncover integration issues? If it's merely testing the component itself, and it is regularly run by upstream, there is little benefit to adding them to yocto qa.
The tests should be built via upstream makefiles, not via a manually hardcoded list (which is also incomplete compared to the makefile, and there's no explanation for that).
Alex
Quoted 104 lines · Poonam Jadhav
From: Poonam Jadhav <[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
5.namehintSigned-off-by Poonam Jadhav <[email protected]>--- .../distro/include/ptest-packagelists.inc | 1 + .../alsa/alsa-lib/run-ptest | 14 ++++++++++++++ .../alsa/alsa-lib_1.2.1.2.bb | 19 ++++++++++++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/run-ptestmeta/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/run-ptest new file +14
-0@@ -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" +donemeta/recipes-multimedia/alsa/alsa-lib_1.2.1.2.bb +18
-2@@ -18,11 +18,12 @@ SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2 \ file://0005-ucm-Do-not-fail-to-parse-configs-on-cards-with-an-em.patch \ file://0001-Fix-alsa-sound-.h-for-external-programs.patch \ file://0001-uapi-Move-typedefs-from-uapi-to-sound.patch \ + file://run-ptest \ " SRC_URI[md5sum] = "82ddd3698469beec147e4f4a67134ea0" SRC_URI[sha256sum] = "958e260e3673f1f6ff6b2d2c0df3fc2e469bea5b2957163ce96ce17f23e87943" -inherit autotools pkgconfig +inherit autotools pkgconfig ptest EXTRA_OECONF += " \ ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \@@ -52,3 +53,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 (#185236): https://lists.openembedded.org/g/openembedded-core/message/185236
Mute This Topic: https://lists.openembedded.org/mt/100480016/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Oh, and: any new feature must be submitted for master branch first, then backported to stable branches.
Alex
Quoted 118 lines · Alexander Kanavin
What do the tests do, and why they should be run? Are they actually useful to run when assembling a custom distribution, and would they help uncover integration issues? If it's merely testing the component itself, and it is regularly run by upstream, there is little benefit to adding them to yocto qa.
The tests should be built via upstream makefiles, not via a manually hardcoded list (which is also incomplete compared to the makefile, and there's no explanation for that).
Alex
Quoted 104 lines · Poonam Jadhav
From: Poonam Jadhav <[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
5.namehintSigned-off-by Poonam Jadhav <[email protected]>--- .../distro/include/ptest-packagelists.inc | 1 + .../alsa/alsa-lib/run-ptest | 14 ++++++++++++++ .../alsa/alsa-lib_1.2.1.2.bb | 19 ++++++++++++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/run-ptestmeta/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/run-ptest new file +14
-0@@ -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" +donemeta/recipes-multimedia/alsa/alsa-lib_1.2.1.2.bb +18
-2@@ -18,11 +18,12 @@ SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2 \ file://0005-ucm-Do-not-fail-to-parse-configs-on-cards-with-an-em.patch \ file://0001-Fix-alsa-sound-.h-for-external-programs.patch \ file://0001-uapi-Move-typedefs-from-uapi-to-sound.patch \ + file://run-ptest \ " SRC_URI[md5sum] = "82ddd3698469beec147e4f4a67134ea0" SRC_URI[sha256sum] = "958e260e3673f1f6ff6b2d2c0df3fc2e469bea5b2957163ce96ce17f23e87943" -inherit autotools pkgconfig +inherit autotools pkgconfig ptest EXTRA_OECONF += " \ ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \@@ -52,3 +53,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 (#185236): https://lists.openembedded.org/g/openembedded-core/message/185236
Mute This Topic: https://lists.openembedded.org/mt/100480016/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-