]> code.ossystems Code Review - openembedded-core.git/commitdiff
acl: enable ptest support
authorChong Lu <Chong.Lu@windriver.com>
Sun, 26 Jan 2014 07:50:14 +0000 (15:50 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Feb 2014 15:27:55 +0000 (15:27 +0000)
Install acl test suite and run it as ptest.
nfs test cases need depend on nfs service. So exclude them order to
make ptest all pass.

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-support/attr/acl.inc
meta/recipes-support/attr/acl/run-ptest [new file with mode: 0644]

index a46123286e55e47e4564af93ab6e2576649f7467..04967a6027c82b246d6b50fdaa61561e92b46426 100644 (file)
@@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
                     file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
 
 DEPENDS = "attr"
-SRC_URI = "http://download.savannah.gnu.org/releases/acl/${BP}.src.tar.gz"
+SRC_URI = "http://download.savannah.gnu.org/releases/acl/${BP}.src.tar.gz \
+           file://run-ptest \
+"
 
 require ea-acl.inc
 
@@ -24,3 +26,13 @@ do_install_append() {
        sed -i ${D}${libdir}/libacl.la -e \
            s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
 }
+
+inherit ptest
+
+do_install_ptest() {
+       tar -cf - test/ --exclude nfs | ( cd ${D}${PTEST_PATH} && tar -xf - )
+       mkdir ${D}${PTEST_PATH}/include
+       cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
+}
+
+RDEPENDS_${PN}-ptest = "bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
diff --git a/meta/recipes-support/attr/acl/run-ptest b/meta/recipes-support/attr/acl/run-ptest
new file mode 100644 (file)
index 0000000..3b31cc9
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+gpasswd -a daemon bin
+make -C test -k tests root-tests |sed \
+ -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
+ -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
+gpasswd -d daemon bin