Patchwork [4/8] acl: Add ptest

login
register
mail settings
Submitter Björn Stenberg
Date Feb. 19, 2013, 1:14 p.m.
Message ID <1361279644-17675-5-git-send-email-bjst@enea.com>
Download mbox | patch
Permalink /patch/44851/
State New
Headers show

Comments

Björn Stenberg - Feb. 19, 2013, 1:14 p.m.
From: "Rick.Yang" <rick.yang@enea.com>


Signed-off-by: Björn Stenberg <bjst@enea.com>
---
 meta/recipes-support/attr/acl_2.2.51.bb            |   21 ++++++++++++++++
 .../attr/files/add-runtest-target.patch            |   26 ++++++++++++++++++++
 meta/recipes-support/attr/files/run-ptest          |    8 ++++++
 3 files changed, 55 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-support/attr/files/add-runtest-target.patch
 create mode 100644 meta/recipes-support/attr/files/run-ptest
Richard Purdie - Feb. 22, 2013, 1:59 p.m.
On Tue, 2013-02-19 at 14:14 +0100, Björn Stenberg wrote:
> From: "Rick.Yang" <rick.yang@enea.com>
> 
> 
> Signed-off-by: Björn Stenberg <bjst@enea.com>
> ---
>  meta/recipes-support/attr/acl_2.2.51.bb            |   21 ++++++++++++++++
>  .../attr/files/add-runtest-target.patch            |   26 ++++++++++++++++++++
>  meta/recipes-support/attr/files/run-ptest          |    8 ++++++
>  3 files changed, 55 insertions(+), 0 deletions(-)
>  create mode 100644 meta/recipes-support/attr/files/add-runtest-target.patch
>  create mode 100644 meta/recipes-support/attr/files/run-ptest
> 
> diff --git a/meta/recipes-support/attr/acl_2.2.51.bb b/meta/recipes-support/attr/acl_2.2.51.bb
> index 1c40b00..92d67e0 100644
> --- a/meta/recipes-support/attr/acl_2.2.51.bb
> +++ b/meta/recipes-support/attr/acl_2.2.51.bb
> @@ -4,3 +4,24 @@ PR = "r3"
>  
>  SRC_URI[md5sum] = "3fc0ce99dc5253bdcce4c9cd437bc267"
>  SRC_URI[sha256sum] = "06854521cf5d396801af7e54b9636680edf8064355e51c07657ec7442a185225"
> +
> +FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

Is the above line needed?

Cheers,

Richard

Patch

diff --git a/meta/recipes-support/attr/acl_2.2.51.bb b/meta/recipes-support/attr/acl_2.2.51.bb
index 1c40b00..92d67e0 100644
--- a/meta/recipes-support/attr/acl_2.2.51.bb
+++ b/meta/recipes-support/attr/acl_2.2.51.bb
@@ -4,3 +4,24 @@  PR = "r3"
 
 SRC_URI[md5sum] = "3fc0ce99dc5253bdcce4c9cd437bc267"
 SRC_URI[sha256sum] = "06854521cf5d396801af7e54b9636680edf8064355e51c07657ec7442a185225"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://add-runtest-target.patch \
+	    file://run-ptest \
+	   "
+
+inherit ptest
+
+RDEPENDS_${PN}-ptest += "perl \
+                         perl-module-filehandle \
+                         perl-module-getopt-std \
+                         perl-module-posix"
+
+do_install_append() {
+    if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ] ; then
+        sed -i -e 's/include $(TOPDIR)\/include\/builddefs//g' ${B}/test/Makefile
+        ptest_do_install
+        cp -r ${B}/test/ ${D}${PTEST_PATH}/
+    fi
+}
diff --git a/meta/recipes-support/attr/files/add-runtest-target.patch b/meta/recipes-support/attr/files/add-runtest-target.patch
new file mode 100644
index 0000000..25fdaca
--- /dev/null
+++ b/meta/recipes-support/attr/files/add-runtest-target.patch
@@ -0,0 +1,26 @@ 
+From 149c3a4f0ba84b4ff94a52029dc89b887dcb6b8c Mon Sep 17 00:00:00 2001
+From: "Rick.Yang" <rick.yang@enea.com>
+Date: Mon, 17 Dec 2012 07:27:39 +0100
+Subject: [PATCH] Add runtest target for ptest.
+
+Signed-off-by: Rick.Yang <rick.yang@enea.com>
+Upstream-status: Pending
+
+---
+ test/Makefile |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/test/Makefile b/test/Makefile
+index d2baac8..5f52e10 100644
+--- a/test/Makefile
++++ b/test/Makefile
+@@ -47,4 +47,5 @@ $(ROOT):
+ .PHONY: $(TESTS) $(NFS) $(ROOT)
+ .NOTPARALLEL:
+ 
+-
++runtest-TESTS:
++	perl run $(TESTS)
+-- 
+1.7.5.4
+
diff --git a/meta/recipes-support/attr/files/run-ptest b/meta/recipes-support/attr/files/run-ptest
new file mode 100644
index 0000000..c431f04
--- /dev/null
+++ b/meta/recipes-support/attr/files/run-ptest
@@ -0,0 +1,8 @@ 
+#!/bin/sh
+#
+#This script is used to run acl test suites
+
+cd ./test/
+
+make -k runtest-TESTS | sed '/commands/d' | sed '/ok\| passed/ s/^/PASS: /g' | sed '/error\|fail\|failed[^0]\|ERROR\|FAIL/ s/^/FAIL: /g' | sed 's/UPATH=\".*\"/UPATH=UTF8-String/g'
+