* [PATCH V2 0/1] attr: enable ptest support
@ 2014-01-26 9:51 Chong Lu
2014-01-26 9:51 ` [PATCH V2 1/1] " Chong Lu
0 siblings, 1 reply; 2+ messages in thread
From: Chong Lu @ 2014-01-26 9:51 UTC (permalink / raw)
To: openembedded-core
Changes since V1:
Delete incorrect patch for test cases and exclude ext test cases.
The following changes since commit 1a9226f140f578f11696abf1a3c989fae1d4c14a:
libtool-cross/native: Force usage of bash due to sstate inconsistencies (2014-01-23 12:18:05 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib chonglu/attr
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=chonglu/attr
Chong Lu (1):
attr: enable ptest support
meta/recipes-support/attr/attr.inc | 17 ++++++++++++++++-
meta/recipes-support/attr/files/run-ptest | 5 +++++
2 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-support/attr/files/run-ptest
--
1.8.1.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH V2 1/1] attr: enable ptest support
2014-01-26 9:51 [PATCH V2 0/1] attr: enable ptest support Chong Lu
@ 2014-01-26 9:51 ` Chong Lu
0 siblings, 0 replies; 2+ messages in thread
From: Chong Lu @ 2014-01-26 9:51 UTC (permalink / raw)
To: openembedded-core
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.
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
---
meta/recipes-support/attr/attr.inc | 17 ++++++++++++++++-
meta/recipes-support/attr/files/run-ptest | 5 +++++
2 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-support/attr/files/run-ptest
diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
index 4961ba7..873c1ff 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 \
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"
diff --git a/meta/recipes-support/attr/files/run-ptest b/meta/recipes-support/attr/files/run-ptest
new file mode 100644
index 0000000..a6c6867
--- /dev/null
+++ b/meta/recipes-support/attr/files/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+make -C test -k tests root-tests |sed \
+ -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
+ -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-26 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-26 9:51 [PATCH V2 0/1] attr: enable ptest support Chong Lu
2014-01-26 9:51 ` [PATCH V2 1/1] " Chong Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox