mirror of
https://git.yoctoproject.org/poky
synced 2026-04-10 05:02:22 +02:00
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>
This commit is contained in:
@@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \
|
||||
file://attr/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \
|
||||
file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb"
|
||||
|
||||
SRC_URI = "http://download.savannah.gnu.org/releases/attr/${BP}.src.tar.gz"
|
||||
SRC_URI = "http://download.savannah.gnu.org/releases/attr/${BP}.src.tar.gz \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
require ea-acl.inc
|
||||
|
||||
@@ -20,3 +22,16 @@ do_install_append() {
|
||||
sed -i ${D}${libdir}/libattr.la -e \
|
||||
s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
|
||||
}
|
||||
|
||||
inherit ptest
|
||||
|
||||
do_install_ptest() {
|
||||
tar -cf - test/ --exclude ext | ( cd ${D}${PTEST_PATH} && tar -xf - )
|
||||
mkdir ${D}${PTEST_PATH}/include
|
||||
for i in builddefs buildmacros buildrules; \
|
||||
do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \
|
||||
done
|
||||
sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
|
||||
}
|
||||
|
||||
RDEPENDS_${PN}-ptest = "coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
|
||||
|
||||
5
meta/recipes-support/attr/files/run-ptest
Normal file
5
meta/recipes-support/attr/files/run-ptest
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
make -C test -k tests root-tests |sed \
|
||||
-e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
|
||||
-e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
|
||||
Reference in New Issue
Block a user