@@ -5,6 +5,7 @@
#
PTESTS_FAST = "\
acl \
+ alsa-lib \
apr-util \
attr \
babeltrace2 \
new file mode 100644
@@ -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
@@ -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] = "f740db7f488255944ffd4428416ee3390a96742856916433df468c281436480e"
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
EXTRA_OECONF += " \
${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \
@@ -41,4 +43,22 @@ RPROVIDES:alsa-conf = "alsa-conf-base"
RREPLACES:alsa-conf = "alsa-conf-base"
RCONFLICTS:alsa-conf = "alsa-conf-base"
+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
+}
BBCLASSEXTEND = "native nativesdk"