summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/conf/include/ptest-packagelists-meta-oe.inc1
-rw-r--r--meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb18
-rw-r--r--meta-oe/recipes-multimedia/audiofile/files/run-ptest14
3 files changed, 32 insertions, 1 deletions
diff --git a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
index ee12681bb4..09b1dbb3e1 100644
--- a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
+++ b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
@@ -8,6 +8,7 @@
8# ptests which take less than ~30s each 8# ptests which take less than ~30s each
9PTESTS_FAST_META_OE = "\ 9PTESTS_FAST_META_OE = "\
10 asio \ 10 asio \
11 audiofile \
11 cli11 \ 12 cli11 \
12 cmocka \ 13 cmocka \
13 cunit \ 14 cunit \
diff --git a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
index fd80729bd2..f734a41dfc 100644
--- a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
+++ b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
10 10
11SRC_URI = " \ 11SRC_URI = " \
12 ${GNOME_MIRROR}/audiofile/0.3/${BP}.tar.xz \ 12 ${GNOME_MIRROR}/audiofile/0.3/${BP}.tar.xz \
13 file://run-ptest \
13 file://0001-fix-negative-shift-constants.patch \ 14 file://0001-fix-negative-shift-constants.patch \
14 file://0002-fix-build-on-gcc6.patch \ 15 file://0002-fix-build-on-gcc6.patch \
15 file://0003-fix-CVE-2015-7747.patch \ 16 file://0003-fix-CVE-2015-7747.patch \
@@ -23,7 +24,7 @@ SRC_URI = " \
23" 24"
24SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782" 25SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782"
25 26
26inherit autotools lib_package pkgconfig 27inherit autotools lib_package pkgconfig ptest
27 28
28CXXFLAGS += "-std=c++14" 29CXXFLAGS += "-std=c++14"
29 30
@@ -33,3 +34,18 @@ DEPENDS = " \
33 libogg \ 34 libogg \
34 flac \ 35 flac \
35" 36"
37
38do_compile_ptest(){
39 oe_runmake -C gtest libgtest.la
40 cd test
41 # Query the TESTS variable value, remove the $(...) parts from it,
42 # compile as make target along with FLAC (which is an optional test)
43 oe_runmake `make -p | grep "^TESTS = " | sed 's/$([^)]*)//g' | cut -d= -f2` FLAC
44}
45
46do_install_ptest(){
47 install -d ${D}${PTEST_PATH}/test
48 for t in test/.libs/*; do
49 install $t ${D}${PTEST_PATH}/test/
50 done
51}
diff --git a/meta-oe/recipes-multimedia/audiofile/files/run-ptest b/meta-oe/recipes-multimedia/audiofile/files/run-ptest
new file mode 100644
index 0000000000..4e41ef3cda
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/run-ptest
@@ -0,0 +1,14 @@
1#!/bin/sh
2
3RES=0
4cd test
5for t in *; do
6 if ./$t; then
7 echo PASS: $t
8 else
9 echo FAIL: $t
10 RES=1
11 fi
12done
13
14exit $RES