summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Lu <Chong.Lu@windriver.com>2014-01-26 17:51:29 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-17 15:28:58 +0000
commit0f03282c6a70f0a33809c9c8ba4e64ea43e754c7 (patch)
tree63cfb4b56f9f335f2511b3776517245d864befb3
parent29a7e791aa331d0ac6e8728ff44af2d8732183d3 (diff)
downloadpoky-0f03282c6a70f0a33809c9c8ba4e64ea43e754c7.tar.gz
attr: enable ptest support
Install attr test suite and run it as ptest. ext test cases need depend on specific filesystem. So exclude them order to make ptest all pass. (From OE-Core rev: 4395504e5f2af16e108a67962ab7cbcab26aa444) Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/attr/attr.inc17
-rw-r--r--meta/recipes-support/attr/files/run-ptest5
2 files changed, 21 insertions, 1 deletions
diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
index 4961ba784f..873c1fffd9 100644
--- a/meta/recipes-support/attr/attr.inc
+++ b/meta/recipes-support/attr/attr.inc
@@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \
11 file://attr/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \ 11 file://attr/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \
12 file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb" 12 file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb"
13 13
14SRC_URI = "http://download.savannah.gnu.org/releases/attr/${BP}.src.tar.gz" 14SRC_URI = "http://download.savannah.gnu.org/releases/attr/${BP}.src.tar.gz \
15 file://run-ptest \
16"
15 17
16require ea-acl.inc 18require ea-acl.inc
17 19
@@ -20,3 +22,16 @@ do_install_append() {
20 sed -i ${D}${libdir}/libattr.la -e \ 22 sed -i ${D}${libdir}/libattr.la -e \
21 s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\', 23 s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
22} 24}
25
26inherit ptest
27
28do_install_ptest() {
29 tar -cf - test/ --exclude ext | ( cd ${D}${PTEST_PATH} && tar -xf - )
30 mkdir ${D}${PTEST_PATH}/include
31 for i in builddefs buildmacros buildrules; \
32 do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \
33 done
34 sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
35}
36
37RDEPENDS_${PN}-ptest = "coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
diff --git a/meta/recipes-support/attr/files/run-ptest b/meta/recipes-support/attr/files/run-ptest
new file mode 100644
index 0000000000..a6c6867f2d
--- /dev/null
+++ b/meta/recipes-support/attr/files/run-ptest
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3make -C test -k tests root-tests |sed \
4 -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
5 -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'