Skip to contentSkip to conversation

acl: enable ptest support

PATCH In review Chong Lu 2 participants 3 messages Jan 26, 2014 – Feb 1, 2014

lore
Share & tools
lore

Chong Lu

author
#0 lore raw

v3 cover acl: enable ptest support

Changes since V2:
Delete incorrect patch for test cases and add gpasswd command in run-ptest.

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/acl
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=chonglu/acl

Chong Lu (1):
acl: enable ptest support

 meta/recipes-support/attr/acl.inc       | 14 +++++++++++++-
 meta/recipes-support/attr/acl/run-ptest |  7 +++++++
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/attr/acl/run-ptest
Signature · 1 line
1.8.1.2
author
#1 lore raw

PATCH v3 1/1 acl: enable ptest support

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.

---
 meta/recipes-support/attr/acl.inc       | 14 +++++++++++++-
 meta/recipes-support/attr/acl/run-ptest |  7 +++++++
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/attr/acl/run-ptest
meta/recipes-support/attr/acl.inc +13 -1
index a461232..04967a6 100644
@@ -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"
meta/recipes-support/attr/acl/run-ptest new file +7 -0
new file mode 100644
index 0000000..3b31cc9
@@ -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
Signature · 1 line
1.8.1.2
#2 lore raw
Quoted 30 lines · Chong Lu

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.

---
 meta/recipes-support/attr/acl.inc       | 14 +++++++++++++-
 meta/recipes-support/attr/acl/run-ptest |  7 +++++++
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/attr/acl/run-ptest
meta/recipes-support/attr/acl.inc +3 -1
index a461232..04967a6 100644
@@ -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}\',
 }

meta/recipes-support/attr/acl.inc do_install_append() { · line 38

Quoted 10 lines
meta/recipes-support/attr/acl.inc +10 -0
+
+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"

This set of dependencies is proving problematic. Firstly it is going to increase build times as perl gets pulled in. coreutils also pulls in gmp which doesn't appear to build on x32.

This patch is therefore why we keep seeing MUT builds of nightly-x32 fail.

http://autobuilder.yoctoproject.org/main/builders/nightly-x32/builds/9/steps/BuildImages/logs/stdio

No doubt we need to fix this, however it does also show how convoluted our dependency chains are and how a small change like this, raises other issues elsewhere.

I opened a bug about the gmp issue:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=5783

Cheers,

Richard