All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Ptest additions
@ 2013-02-19 13:13 Björn Stenberg
  2013-02-19 13:13 ` [PATCH 1/8] busybox: Add ptest Björn Stenberg
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Björn Stenberg @ 2013-02-19 13:13 UTC (permalink / raw)
  To: openembedded-core

Here is a handful ptest additions for various packages.
Also included is a minor tweak for ptest.bbclass.

Anders Roxell (1):
  zlib: Add ptest

Björn Stenberg (4):
  bzip2: Add ptest
  openssh: Add ptest
  openssl: Add ptest
  ptest: Add missed .debug path

Daniel Dai (1):
  busybox: Add ptest

Rick Yang (1):
  acl: Add ptest

Jack Zhang (1):
  udev: Add ptest

 meta/classes/ptest.bbclass                         |    3 +-
 .../add-test-support-for-busybox.patch             |   61 ++++++++++++++++
 .../openssh/openssh-6.1p1/run-ptest                |    7 ++
 meta/recipes-connectivity/openssh/openssh_6.1p1.bb |   11 +++-
 .../openssl/openssl-1.0.0j/Makefiles-ptest.patch   |   74 ++++++++++++++++++++
 .../openssl/openssl-1.0.0j/run-ptest               |    2 +
 meta/recipes-connectivity/openssl/openssl.inc      |   19 +++++-
 .../recipes-connectivity/openssl/openssl_1.0.0j.bb |    2 +
 meta/recipes-core/busybox/busybox.inc              |    2 +-
 meta/recipes-core/busybox/busybox_1.20.2.bb        |   10 +++
 meta/recipes-core/busybox/files/run-ptest          |   11 +++
 meta/recipes-core/udev/udev.inc                    |   19 +++++-
 .../recipes-core/udev/udev/add-install-ptest.patch |   60 ++++++++++++++++
 meta/recipes-core/udev/udev/run-ptest              |    3 +
 .../zlib/zlib-1.2.7/Makefile-runtests.patch        |   38 ++++++++++
 meta/recipes-core/zlib/zlib-1.2.7/run-ptest        |    7 ++
 meta/recipes-core/zlib/zlib_1.2.7.bb               |   22 ++++++
 .../recipes-extended/bzip2/bzip2-1.0.6/Makefile.am |   32 +++++++++
 meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest  |    2 +
 meta/recipes-extended/bzip2/bzip2_1.0.6.bb         |   10 +++-
 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 ++
 23 files changed, 443 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-connectivity/openssh/openssh-6.1p1/add-test-support-for-busybox.patch
 create mode 100755 meta/recipes-connectivity/openssh/openssh-6.1p1/run-ptest
 create mode 100644 meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
 create mode 100644 meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest
 create mode 100644 meta/recipes-core/busybox/files/run-ptest
 create mode 100644 meta/recipes-core/udev/udev/add-install-ptest.patch
 create mode 100755 meta/recipes-core/udev/udev/run-ptest
 create mode 100644 meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch
 create mode 100644 meta/recipes-core/zlib/zlib-1.2.7/run-ptest
 create mode 100644 meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
 create mode 100644 meta/recipes-support/attr/files/add-runtest-target.patch
 create mode 100644 meta/recipes-support/attr/files/run-ptest

-- 
1.7.5.4




^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/8] busybox: Add ptest
  2013-02-19 13:13 [PATCH 0/8] Ptest additions Björn Stenberg
@ 2013-02-19 13:13 ` Björn Stenberg
  2013-02-19 14:04   ` Bernhard Reutner-Fischer
  2013-02-19 13:13 ` [PATCH 2/8] zlib: " Björn Stenberg
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Björn Stenberg @ 2013-02-19 13:13 UTC (permalink / raw)
  To: openembedded-core; +Cc: Daniel Dai

From: Daniel Dai <daniel.dai@enea.com>


Signed-off-by: Björn Stenberg <bjst@enea.com>
---
 meta/recipes-core/busybox/busybox.inc       |    2 +-
 meta/recipes-core/busybox/busybox_1.20.2.bb |   10 ++++++++++
 meta/recipes-core/busybox/files/run-ptest   |   11 +++++++++++
 3 files changed, 22 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/busybox/files/run-ptest

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 972e7d0..bd1581c 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -35,7 +35,7 @@ CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
 
 RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
 
-inherit cml1 update-rc.d
+inherit cml1 update-rc.d ptest
 
 # internal helper
 def busybox_cfg(feature, features, tokens, cnf, rem):
diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb b/meta/recipes-core/busybox/busybox_1.20.2.bb
index 783261e..b2e5d47 100644
--- a/meta/recipes-core/busybox/busybox_1.20.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.20.2.bb
@@ -28,9 +28,19 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://fix-for-spurious-testsuite-failure.patch \
            file://busybox-1.20.2-kernel_ver.patch \
            file://stat-usr-bin.patch \
+           file://run-ptest \
            file://testsuite-du-du-k-works-fix-false-positive.patch"
 
 SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
 SRC_URI[tarball.sha256sum] = "eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"
 
 EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
+
+do_install_append () {
+    if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+        ptest_do_install
+        cp -r ${B}/testsuite ${D}${PTEST_PATH}/
+        cp ${B}/.config      ${D}${PTEST_PATH}/
+        ln -s /bin/busybox   ${D}${PTEST_PATH}/busybox
+    fi
+}
diff --git a/meta/recipes-core/busybox/files/run-ptest b/meta/recipes-core/busybox/files/run-ptest
new file mode 100644
index 0000000..8eadce9
--- /dev/null
+++ b/meta/recipes-core/busybox/files/run-ptest
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+current_dir="`readlink -f $0`"
+export bindir="`dirname $current_dir`"
+
+cd testsuite
+if [ $? -ne 0 ]; then
+        exit 1
+fi
+
+./runtest -v | sed  -e 's/^SKIPPED:/SKIP:/' | sed -e 's/^UNTESTED:/SKIP:/'
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/8] zlib: Add ptest
  2013-02-19 13:13 [PATCH 0/8] Ptest additions Björn Stenberg
  2013-02-19 13:13 ` [PATCH 1/8] busybox: Add ptest Björn Stenberg
@ 2013-02-19 13:13 ` Björn Stenberg
  2013-02-22 14:02   ` Richard Purdie
  2013-02-19 13:13 ` [PATCH 3/8] udev: " Björn Stenberg
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Björn Stenberg @ 2013-02-19 13:13 UTC (permalink / raw)
  To: openembedded-core; +Cc: Anders Roxell

From: Anders Roxell <anders.roxell@enea.com>

Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Anders Roxell <anders.roxell@enea.com>
---
 .../zlib/zlib-1.2.7/Makefile-runtests.patch        |   38 ++++++++++++++++++++
 meta/recipes-core/zlib/zlib-1.2.7/run-ptest        |    7 ++++
 meta/recipes-core/zlib/zlib_1.2.7.bb               |   22 +++++++++++
 3 files changed, 67 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch
 create mode 100644 meta/recipes-core/zlib/zlib-1.2.7/run-ptest

diff --git a/meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch b/meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch
new file mode 100644
index 0000000..04c55b4
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch
@@ -0,0 +1,38 @@
+Add 'ptest' target to Makefile, to run tests without checking dependencies.
+
+Signed-off-by: Anders Roxell <anders.roxell@enea.com>
+Upstream-Status: Pending
+---
+diff -uNr a/Makefile.in b/Makefile.in
+--- a/Makefile.in	2012-04-23 07:58:06.000000000 +0200
++++ b/Makefile.in	2012-10-24 08:24:19.822544837 +0200
+@@ -83,6 +83,9 @@
+ test: all teststatic testshared
+ 
+ teststatic: static
++	@make runteststatic
++
++runteststatic:
+ 	@TMPST=`mktemp fooXXXXXX`; \
+ 	if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
+ 	  echo '		*** zlib test OK ***'; \
+@@ -92,6 +95,9 @@
+ 	rm -f $$TMPST
+ 
+ testshared: shared
++	@make runtestshared
++
++runtestshared:
+ 	@LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
+ 	LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
+ 	DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
+@@ -105,6 +111,9 @@
+ 	rm -f $$TMPSH
+ 
+ test64: all64
++	@make runtest64
++
++runtest64:
+ 	@TMP64=`mktemp fooXXXXXX`; \
+ 	if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
+ 	  echo '		*** zlib 64-bit test OK ***'; \
diff --git a/meta/recipes-core/zlib/zlib-1.2.7/run-ptest b/meta/recipes-core/zlib/zlib-1.2.7/run-ptest
new file mode 100644
index 0000000..19d9632
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib-1.2.7/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+FILE=zlib-ptest-$$.log
+make -k runteststatic runtestshared > $FILE
+sed -i -r -e 's/^(\s+\*+ (.+?) test OK \*+)/\1\nPASS: \2/' $FILE
+sed -i -r -e 's/^(\s+\*+ (.+?) test FAILED \*+)/\1\nFAIL: \2/' $FILE
+cat $FILE
+rm -f $FILE
diff --git a/meta/recipes-core/zlib/zlib_1.2.7.bb b/meta/recipes-core/zlib/zlib_1.2.7.bb
index 803fec3..61380ec 100644
--- a/meta/recipes-core/zlib/zlib_1.2.7.bb
+++ b/meta/recipes-core/zlib/zlib_1.2.7.bb
@@ -8,20 +8,42 @@ LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=94d1b5a40dadd127f33
 
 SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.bz2 \
            file://remove.ldconfig.call.patch \
+           file://Makefile-runtests.patch \
+           file://run-ptest \
            "
 SRC_URI[md5sum] = "2ab442d169156f34c379c968f3f482dd"
 SRC_URI[sha256sum] = "49e2e9658dfb036900da6ea0267a737fa3c4eee6666776d378c79d52e9334934"
 
+RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest_virtclass-native = ""
+RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
+
+FILES_${PN}-dbg += "${PTEST_PATH}/.debug"
+
+inherit ptest
+
 do_configure (){
 	./configure --prefix=${prefix} --shared --libdir=${libdir}
 }
 
 do_compile (){
 	oe_runmake
+	if [ ${PTEST_ENABLED} = "1" ] ; then
+		oe_runmake static shared
+	fi
 }
 
 do_install() {
 	oe_runmake DESTDIR=${D} install
+
+	if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+		ptest_do_install
+		install ${B}/Makefile   ${D}${PTEST_PATH}
+		install ${B}/example    ${D}${PTEST_PATH}
+		install ${B}/minigzip   ${D}${PTEST_PATH}
+		install ${B}/examplesh  ${D}${PTEST_PATH}
+		install ${B}/minigzipsh ${D}${PTEST_PATH}
+	fi
 }
 
 BBCLASSEXTEND = "native nativesdk"
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/8] udev: Add ptest
  2013-02-19 13:13 [PATCH 0/8] Ptest additions Björn Stenberg
  2013-02-19 13:13 ` [PATCH 1/8] busybox: Add ptest Björn Stenberg
  2013-02-19 13:13 ` [PATCH 2/8] zlib: " Björn Stenberg
@ 2013-02-19 13:13 ` Björn Stenberg
  2013-02-21  6:55   ` Saul Wold
  2013-02-19 13:14 ` [PATCH 4/8] acl: " Björn Stenberg
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Björn Stenberg @ 2013-02-19 13:13 UTC (permalink / raw)
  To: openembedded-core; +Cc: jack zhang

From: jack zhang <jack.zhang@enea.com>


Signed-off-by: Björn Stenberg <bjst@enea.com>
---
 meta/recipes-core/udev/udev.inc                    |   19 ++++++-
 .../recipes-core/udev/udev/add-install-ptest.patch |   60 ++++++++++++++++++++
 meta/recipes-core/udev/udev/run-ptest              |    3 +
 3 files changed, 80 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/udev/udev/add-install-ptest.patch
 create mode 100755 meta/recipes-core/udev/udev/run-ptest

diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc
index facad0c..8c26eee 100644
--- a/meta/recipes-core/udev/udev.inc
+++ b/meta/recipes-core/udev/udev.inc
@@ -27,9 +27,12 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
            file://local.rules \
            file://udev-cache \
            file://udev-cache.default \
-           file://init"
+           file://init \
+           file://add-install-ptest.patch \
+           file://run-ptest \
+          "
 
-inherit autotools pkgconfig update-rc.d
+inherit autotools pkgconfig update-rc.d ptest
 
 # udevd/udevadm -> /sbin/, libudev.so.* -> /lib/
 sbindir = "${base_sbindir}"
@@ -105,3 +108,15 @@ python () {
     if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
         raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
 }
+
+do_compile_append() {
+    if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+        oe_runmake test-udev
+    fi
+}
+
+do_install_append() {
+    if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+        ptest_do_install
+    fi
+}
diff --git a/meta/recipes-core/udev/udev/add-install-ptest.patch b/meta/recipes-core/udev/udev/add-install-ptest.patch
new file mode 100644
index 0000000..db6cf17
--- /dev/null
+++ b/meta/recipes-core/udev/udev/add-install-ptest.patch
@@ -0,0 +1,60 @@
+Adjustements for ptest:
+
+- Add 'install-ptest' rule.
+- Print a standard result line for each test.
+- Replace the use of "tree" with "find".
+
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+Upstream-status: Pending
+
+--- a/Makefile.am	2012-03-18 16:28:14.000000000 +0100
++++ b/Makefile.am	2013-02-18 10:03:36.531101244 +0100
+@@ -708,3 +708,11 @@
+ 	for i in src/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/libudev/; done
+ 	for i in src/gudev/docs/html/*.{html,css,png}; do rm -f $$i.sign; gpg --armor --detach-sign --output=$$i.sign $$i; done
+ 	for i in src/gudev/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/gudev/; done
++
++install-ptest:
++	install test-udev $(DESTDIR)
++	cp Makefile $(DESTDIR)
++	sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
++	$(MKDIR_P) $(DESTDIR)/test
++	install $(TESTS) $(DESTDIR)/test
++	tar -C $(DESTDIR)/test/ -xJf $(top_srcdir)/test/sys.tar.xz
+--- a/test/udev-test.pl	2012-03-18 16:43:36.000000000 +0100
++++ b/test/udev-test.pl	2013-02-18 10:31:29.706357321 +0100
+@@ -1459,11 +1459,13 @@
+                 print "add:         error";
+                 if ($rules->{exp_add_error}) {
+                         print " as expected\n";
++                        print "XFAIL: TEST $number: $rules->{desc}: add\n";
+                 } else {
+                         print "\n";
+-                        system("tree $udev_root");
++                        system("find $udev_root");
+                         print "\n";
+                         $error++;
++                        print "FAIL: TEST $number: $rules->{desc}: add\n";
+                         sleep(1);
+                 }
+         }
+@@ -1479,15 +1481,18 @@
+                 print "remove:      error";
+                 if ($rules->{exp_rem_error}) {
+                         print " as expected\n";
++                        print "XFAIL: TEST $number: $rules->{desc}: remove\n";
+                 } else {
+                         print "\n";
+-                        system("tree $udev_root");
++                        system("find $udev_root");
+                         print "\n";
+                         $error++;
++                        print "FAIL: TEST $number: $rules->{desc}: remove\n";
+                         sleep(1);
+                 }
+         } else {
+                 print "remove:      ok\n";
++                print "PASS: TEST $number: $rules->{desc}: remove\n";
+         }
+ 
+         print "\n";
diff --git a/meta/recipes-core/udev/udev/run-ptest b/meta/recipes-core/udev/udev/run-ptest
new file mode 100755
index 0000000..6817ef7
--- /dev/null
+++ b/meta/recipes-core/udev/udev/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -k check-TESTS
\ No newline at end of file
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/8] acl: Add ptest
  2013-02-19 13:13 [PATCH 0/8] Ptest additions Björn Stenberg
                   ` (2 preceding siblings ...)
  2013-02-19 13:13 ` [PATCH 3/8] udev: " Björn Stenberg
@ 2013-02-19 13:14 ` Björn Stenberg
  2013-02-22 13:59   ` Richard Purdie
  2013-02-19 13:14 ` [PATCH 5/8] bzip2: " Björn Stenberg
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Björn Stenberg @ 2013-02-19 13:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Rick.Yang

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:"
+
+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'
+
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/8] bzip2: Add ptest
  2013-02-19 13:13 [PATCH 0/8] Ptest additions Björn Stenberg
                   ` (3 preceding siblings ...)
  2013-02-19 13:14 ` [PATCH 4/8] acl: " Björn Stenberg
@ 2013-02-19 13:14 ` Björn Stenberg
  2013-02-19 13:14 ` [PATCH 6/8] openssh: " Björn Stenberg
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 17+ messages in thread
From: Björn Stenberg @ 2013-02-19 13:14 UTC (permalink / raw)
  To: openembedded-core


Signed-off-by: Björn Stenberg <bjst@enea.com>
---
 .../recipes-extended/bzip2/bzip2-1.0.6/Makefile.am |   32 ++++++++++++++++++++
 meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest  |    2 +
 meta/recipes-extended/bzip2/bzip2_1.0.6.bb         |   10 +++++-
 3 files changed, 43 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest

diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
index 070d57b..96cc309 100644
--- a/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
@@ -26,6 +26,38 @@ bin_SCRIPTS = bzgrep bzmore bzdiff
 man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1
 EXTRA_DIST = $(man_MANS)
 
+runtest:
+	./bzip2 -1  < sample1.ref > sample1.rb2
+	./bzip2 -2  < sample2.ref > sample2.rb2
+	./bzip2 -3  < sample3.ref > sample3.rb2
+	./bzip2 -d  < sample1.bz2 > sample1.tst
+	./bzip2 -d  < sample2.bz2 > sample2.tst
+	./bzip2 -ds < sample3.bz2 > sample3.tst
+	@if cmp sample1.bz2 sample1.rb2; then echo "PASS: sample1 compress";\
+	else echo "FAIL: sample1 compress"; fi
+	@if cmp sample2.bz2 sample2.rb2; then echo "PASS: sample2 compress";\
+	else echo "FAIL: sample2 compress"; fi
+	@if cmp sample3.bz2 sample3.rb2; then echo "PASS: sample3 compress";\
+	else echo "FAIL: sample3 compress"; fi
+	@if cmp sample1.tst sample1.ref; then echo "PASS: sample1 decompress";\
+	else echo "FAIL: sample1 decompress"; fi
+	@if cmp sample2.tst sample2.ref; then echo "PASS: sample2 decompress";\
+	else echo "FAIL: sample2 decompress"; fi
+	@if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\
+	else echo "FAIL: sample3 decompress"; fi
+
+install-ptest:
+	mkdir -p $(PTESTDIR)/
+	install -m 0755 $(WDIR)/run-ptest	$(PTESTDIR)/
+	install -m 0755 $(BDIR)/Makefile	$(PTESTDIR)/
+	install -m 0755 $(BDIR)/sample1.ref	$(PTESTDIR)/
+	install -m 0755 $(BDIR)/sample2.ref	$(PTESTDIR)/
+	install -m 0755 $(BDIR)/sample3.ref	$(PTESTDIR)/
+	install -m 0755 $(BDIR)/sample1.bz2	$(PTESTDIR)/
+	install -m 0755 $(BDIR)/sample2.bz2	$(PTESTDIR)/
+	install -m 0755 $(BDIR)/sample3.bz2	$(PTESTDIR)/
+	ln -s $(bindir)/bzip2			$(PTESTDIR)/bzip2
+
 install-exec-hook:
 	ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT)
 	ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT)
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest b/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
new file mode 100644
index 0000000..3b20fce
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+make -k runtest
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
index 6e160cd..e58e3c5 100644
--- a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -10,6 +10,7 @@ PR = "r5"
 
 SRC_URI = "http://www.bzip.org/${PV}/${BPN}-${PV}.tar.gz \
            file://configure.ac \
+           file://run-ptest \
 	   file://Makefile.am"
 
 SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
@@ -19,7 +20,7 @@ PACKAGES =+ "libbz2 libbz2-dev libbz2-staticdev"
 
 CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
 
-inherit autotools update-alternatives
+inherit autotools update-alternatives ptest
 
 ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_${PN} = "bunzip2 bzcat"
@@ -32,6 +33,13 @@ do_configure_prepend () {
 	cp ${STAGING_DATADIR_NATIVE}/automake*/install-sh ${S}/
 }
 
+do_install_append () {
+	if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+		make PTESTDIR=${D}${PTEST_PATH} WDIR=${WORKDIR} BDIR=${B} install-ptest
+                sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile
+	fi
+}
+
 FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
 
 FILES_libbz2-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV}"
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 6/8] openssh: Add ptest
  2013-02-19 13:13 [PATCH 0/8] Ptest additions Björn Stenberg
                   ` (4 preceding siblings ...)
  2013-02-19 13:14 ` [PATCH 5/8] bzip2: " Björn Stenberg
@ 2013-02-19 13:14 ` Björn Stenberg
  2013-02-19 13:14 ` [PATCH 7/8] openssl: " Björn Stenberg
  2013-02-19 13:14 ` [PATCH 8/8] ptest: Add missed .debug path Björn Stenberg
  7 siblings, 0 replies; 17+ messages in thread
From: Björn Stenberg @ 2013-02-19 13:14 UTC (permalink / raw)
  To: openembedded-core


Signed-off-by: Björn Stenberg <bjst@enea.com>
---
 .../add-test-support-for-busybox.patch             |   61 ++++++++++++++++++++
 .../openssh/openssh-6.1p1/run-ptest                |    7 ++
 meta/recipes-connectivity/openssh/openssh_6.1p1.bb |   11 +++-
 3 files changed, 78 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-connectivity/openssh/openssh-6.1p1/add-test-support-for-busybox.patch
 create mode 100755 meta/recipes-connectivity/openssh/openssh-6.1p1/run-ptest

diff --git a/meta/recipes-connectivity/openssh/openssh-6.1p1/add-test-support-for-busybox.patch b/meta/recipes-connectivity/openssh/openssh-6.1p1/add-test-support-for-busybox.patch
new file mode 100644
index 0000000..5913597
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh-6.1p1/add-test-support-for-busybox.patch
@@ -0,0 +1,61 @@
+Adjust test cases to work with busybox.
+
+- Replace dd parameter "obs" with "bs".
+- Replace "head -<num>" with "head -n <num>".
+
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+Upstream-status: Pending
+
+--- a/regress/cipher-speed.sh	2012-06-30 07:08:53.000000000 +0200
++++ b/regress/cipher-speed.sh	2013-02-15 11:30:20.670022055 +0100
+@@ -26,7 +26,7 @@
+ 		echon "$c/$m:\t"
+ 		( ${SSH} -o 'compression no' \
+ 			-F $OBJ/ssh_proxy -2 -m $m -c $c somehost \
+-			exec sh -c \'"dd of=/dev/null obs=32k"\' \
++			exec sh -c \'"dd of=/dev/null bs=32k"\' \
+ 		< ${DATA} ) 2>&1 | getbytes
+ 
+ 		if [ $? -ne 0 ]; then
+@@ -42,7 +42,7 @@
+ 		echon "$c:\t"
+ 		( ${SSH} -o 'compression no' \
+ 			-F $OBJ/ssh_proxy -1 -c $c somehost \
+-			exec sh -c \'"dd of=/dev/null obs=32k"\' \
++			exec sh -c \'"dd of=/dev/null bs=32k"\' \
+ 		< ${DATA} ) 2>&1 | getbytes
+ 		if [ $? -ne 0 ]; then
+ 			fail "ssh -1 failed with cipher $c"
+--- a/regress/transfer.sh	2003-09-04 06:54:40.000000000 +0200
++++ b/regress/transfer.sh	2013-02-15 11:25:34.666411185 +0100
+@@ -18,7 +18,7 @@
+ 	for s in 10 100 1k 32k 64k 128k 256k; do
+ 		trace "proto $p dd-size ${s}"
+ 		rm -f ${COPY}
+-		dd if=$DATA obs=${s} 2> /dev/null | \
++		dd if=$DATA bs=${s} 2> /dev/null | \
+ 			${SSH} -q -$p -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
+ 		if [ $? -ne 0 ]; then
+ 			fail "ssh cat $DATA failed"
+--- a/regress/yes-head.sh	2005-11-28 06:41:03.000000000 +0100
++++ b/regress/yes-head.sh	2013-02-15 11:55:11.413715068 +0100
+@@ -4,7 +4,7 @@
+ tid="yes pipe head"
+ 
+ for p in 1 2; do
+-	lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)`
++	lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -n 2000"' | (sleep 3 ; wc -l)`
+ 	if [ $? -ne 0 ]; then
+ 		fail "yes|head test failed"
+ 		lines = 0;
+--- a/regress/key-options.sh	2008-07-04 09:08:58.000000000 +0200
++++ b/regress/key-options.sh	2013-02-15 12:06:05.109486098 +0100
+@@ -54,7 +54,7 @@
+ 	fi
+ 
+ 	sed 's/.*/from="'"$f"'" &/' $origkeys >$authkeys
+-	from=`head -1 $authkeys | cut -f1 -d ' '`
++	from=`head -n 1 $authkeys | cut -f1 -d ' '`
+ 	verbose "key option proto $p $from"
+ 	r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost 'echo true'`
+ 	if [ "$r" = "true" ]; then
diff --git a/meta/recipes-connectivity/openssh/openssh-6.1p1/run-ptest b/meta/recipes-connectivity/openssh/openssh-6.1p1/run-ptest
new file mode 100755
index 0000000..3e725cf
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh-6.1p1/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+export TEST_SHELL=sh
+
+cd regress
+make -k .OBJDIR=`pwd` .CURDIR=`pwd` tests \
+        | sed -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g'
diff --git a/meta/recipes-connectivity/openssh/openssh_6.1p1.bb b/meta/recipes-connectivity/openssh/openssh_6.1p1.bb
index 32c3b2c..b2a70b7 100644
--- a/meta/recipes-connectivity/openssh/openssh_6.1p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_6.1p1.bb
@@ -25,13 +25,15 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.
            file://ssh_config \
            file://init \
            file://openssh-CVE-2011-4327.patch \
+           file://add-test-support-for-busybox.patch \
+           file://run-ptest \
            ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
 
 PAM_SRC_URI = "file://sshd"
 
 SRC_URI[md5sum] = "3345cbf4efe90ffb06a78670ab2d05d5"
 SRC_URI[sha256sum] = "d1c157f6c0852e90c191cc7c9018a583b51e3db4035489cb262639d337a1c411"
-inherit useradd update-rc.d update-alternatives
+inherit useradd update-rc.d update-alternatives ptest
 
 USERADD_PACKAGES = "${PN}-sshd"
 USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
@@ -81,6 +83,12 @@ do_install_append () {
 	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
 	rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
 	rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
+
+	if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+		ptest_do_install
+		sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libdir}/${PN}/sftp-server|" regress/test-exec.sh
+		cp -r regress ${D}{$PTEST_PATH}
+	fi
 }
 
 ALLOW_EMPTY_${PN} = "1"
@@ -98,6 +106,7 @@ FILES_${PN}-keygen = "${bindir}/ssh-keygen"
 RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
 DEPENDS_${PN}-sshd += "update-rc.d"
 RDEPENDS_${PN}-sshd += "update-rc.d ${PN}-keygen"
+RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
 
 CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
 CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 7/8] openssl: Add ptest
  2013-02-19 13:13 [PATCH 0/8] Ptest additions Björn Stenberg
                   ` (5 preceding siblings ...)
  2013-02-19 13:14 ` [PATCH 6/8] openssh: " Björn Stenberg
@ 2013-02-19 13:14 ` Björn Stenberg
  2013-02-22 14:05   ` Richard Purdie
  2013-02-19 13:14 ` [PATCH 8/8] ptest: Add missed .debug path Björn Stenberg
  7 siblings, 1 reply; 17+ messages in thread
From: Björn Stenberg @ 2013-02-19 13:14 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Björn Stenberg <bjst@enea.com>
---
 .../openssl/openssl-1.0.0j/Makefiles-ptest.patch   |   74 ++++++++++++++++++++
 .../openssl/openssl-1.0.0j/run-ptest               |    2 +
 meta/recipes-connectivity/openssl/openssl.inc      |   19 +++++-
 .../recipes-connectivity/openssl/openssl_1.0.0j.bb |    2 +
 4 files changed, 96 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
 create mode 100644 meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest

diff --git a/meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch b/meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
new file mode 100644
index 0000000..e65f17b
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
@@ -0,0 +1,74 @@
+Add 'buildtest' and 'runtest' targets to Makefile, to build and run tests
+cross-compiled.
+
+Signed-off-by: Anders Roxell <anders.roxell@enea.com>
+Upstream-Status: Pending
+---
+diff -uNr a/Makefile b/Makefile
+--- a/Makefile.org	2012-05-10 17:06:02.000000000 +0200
++++ b/Makefile.org	2012-10-27 00:05:55.359424024 +0200
+@@ -411,8 +411,16 @@
+ test:   tests
+ 
+ tests: rehash
++	$(MAKE) buildtest
++	$(MAKE) runtest
++
++buildtest:
++	@(cd test && \
++	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf exe apps);
++
++runtest:
+ 	@(cd test && echo "testing..." && \
+-	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
++	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf alltests );
+ 	OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
+ 
+ report:
+diff --git a/test/Makefile b/test/Makefile
+index 3912f82..1696767 100644
+--- a/test/Makefile
++++ b/test/Makefile
+@@ -128,7 +128,7 @@ tests:	exe apps $(TESTS)
+ apps:
+ 	@(cd ..; $(MAKE) DIRS=apps all)
+ 
+-alltests: \
++all-tests= \
+ 	test_des test_idea test_sha test_md4 test_md5 test_hmac \
+ 	test_md2 test_mdc2 test_wp \
+ 	test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_aes \
+@@ -138,6 +138,11 @@ alltests: \
+ 	test_ss test_ca test_engine test_evp test_ssl test_tsa test_ige \
+ 	test_jpake test_cms
+ 
++alltests:
++	@(for i in $(all-tests); do \
++	( $(MAKE) $$i && echo "PASS: $$i" ) || echo "FAIL: $$i"; \
++	done)
++
+ test_evp:
+ 	../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt
+ 
+@@ -203,7 +208,7 @@ test_x509:
+ 	echo test second x509v3 certificate
+ 	sh ./tx509 v3-cert2.pem 2>/dev/null
+ 
+-test_rsa: $(RSATEST)$(EXE_EXT)
++test_rsa:
+ 	@sh ./trsa 2>/dev/null
+ 	../util/shlib_wrap.sh ./$(RSATEST)
+ 
+@@ -298,11 +303,11 @@ test_tsa:
+ 	  sh ./testtsa; \
+ 	fi
+ 
+-test_ige: $(IGETEST)$(EXE_EXT)
++test_ige:
+ 	@echo "Test IGE mode"
+ 	../util/shlib_wrap.sh ./$(IGETEST)
+ 
+-test_jpake: $(JPAKETEST)$(EXE_EXT)
++test_jpake:
+ 	@echo "Test JPAKE"
+ 	../util/shlib_wrap.sh ./$(JPAKETEST)
diff --git a/meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest b/meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest
new file mode 100644
index 0000000..3b20fce
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+make -k runtest
diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index e1e7b65..62acf95 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -33,7 +33,7 @@ export DIRS = "crypto ssl apps"
 export EX_LIBS = "-lgcc -ldl"
 export AS = "${CC} -c"
 
-inherit pkgconfig siteinfo
+inherit pkgconfig siteinfo ptest
 
 PACKAGES =+ "libcrypto libssl ${PN}-misc"
 FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}"
@@ -42,6 +42,8 @@ FILES_${PN} =+ " ${libdir}/ssl/*"
 FILES_${PN}-misc = "${libdir}/ssl/misc ${libdir}/ssl/openssl.cnf"
 FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
 
+RDEPENDS_${PN}-ptest = "openssl-misc"
+
 do_configure_prepend_darwin () {
 	sed -i -e '/version-script=openssl\.ld/d' Configure
 }
@@ -125,6 +127,9 @@ do_configure () {
 
 do_compile () {
 	oe_runmake
+	if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ] ; then
+	    oe_runmake buildtest
+	fi
 }
 
 do_install () {
@@ -144,6 +149,18 @@ do_install () {
 	cp --dereference -R include/openssl ${D}${includedir}
 	sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl
 
+        if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+            ptest_do_install
+            cp -r Makefile test ${D}${PTEST_PATH}
+            mkdir -p ${D}${PTEST_PATH}/apps
+            ln -s /usr/lib/ssl/misc/CA.sh  ${D}${PTEST_PATH}/apps
+            ln -s /usr/lib/ssl/openssl.cnf ${D}${PTEST_PATH}/apps
+            ln -s /usr/bin/openssl         ${D}${PTEST_PATH}/apps
+            cp apps/server2.pem            ${D}${PTEST_PATH}/apps
+            mkdir -p ${D}${PTEST_PATH}/util
+            install util/opensslwrap.sh    ${D}${PTEST_PATH}/util
+            install util/shlib_wrap.sh     ${D}${PTEST_PATH}/util
+        fi
 }
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.0j.bb b/meta/recipes-connectivity/openssl/openssl_1.0.0j.bb
index 8c0166a..7b2d167 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.0.0j.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.0.0j.bb
@@ -29,7 +29,9 @@ SRC_URI += "file://configure-targets.patch \
             file://debian/no-symbolic.patch \
             file://debian/debian-targets.patch \
             file://openssl_fix_for_x32.patch \
+            file://Makefiles-ptest.patch \
             file://find.pl \
+            file://run-ptest \
            "
 
 SRC_URI[md5sum] = "cbe4ac0d8f598680f68a951e04b0996b"
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 8/8] ptest: Add missed .debug path
  2013-02-19 13:13 [PATCH 0/8] Ptest additions Björn Stenberg
                   ` (6 preceding siblings ...)
  2013-02-19 13:14 ` [PATCH 7/8] openssl: " Björn Stenberg
@ 2013-02-19 13:14 ` Björn Stenberg
  7 siblings, 0 replies; 17+ messages in thread
From: Björn Stenberg @ 2013-02-19 13:14 UTC (permalink / raw)
  To: openembedded-core


Signed-off-by: Björn Stenberg <bjst@enea.com>
---
 meta/classes/ptest.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 361de78..131af7b 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -16,7 +16,8 @@ RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
 
 PACKAGES += "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
 
-FILES_${PN}-dbg += "${PTEST_PATH}/*/.debug \
+FILES_${PN}-dbg += "${PTEST_PATH}/.debug \
+                    ${PTEST_PATH}/*/.debug \
                     ${PTEST_PATH}/*/*/.debug \
                     ${PTEST_PATH}/*/*/*/.debug \
                     ${PTEST_PATH}/*/*/*/*/.debug \
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/8] busybox: Add ptest
  2013-02-19 13:13 ` [PATCH 1/8] busybox: Add ptest Björn Stenberg
@ 2013-02-19 14:04   ` Bernhard Reutner-Fischer
  2013-02-20 14:52     ` [PATCH 1/8 v2] " Björn Stenberg
  0 siblings, 1 reply; 17+ messages in thread
From: Bernhard Reutner-Fischer @ 2013-02-19 14:04 UTC (permalink / raw)
  To: Björn Stenberg; +Cc: Daniel Dai, openembedded-core

On 19 February 2013 14:13, Björn Stenberg <bjst@enea.com> wrote:
> From: Daniel Dai <daniel.dai@enea.com>
>
>
> Signed-off-by: Björn Stenberg <bjst@enea.com>
> ---
>  meta/recipes-core/busybox/busybox.inc       |    2 +-
>  meta/recipes-core/busybox/busybox_1.20.2.bb |   10 ++++++++++
>  meta/recipes-core/busybox/files/run-ptest   |   11 +++++++++++
>  3 files changed, 22 insertions(+), 1 deletions(-)
>  create mode 100644 meta/recipes-core/busybox/files/run-ptest
>
> diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
> index 972e7d0..bd1581c 100644
> --- a/meta/recipes-core/busybox/busybox.inc
> +++ b/meta/recipes-core/busybox/busybox.inc
> @@ -35,7 +35,7 @@ CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
>
>  RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
>
> -inherit cml1 update-rc.d
> +inherit cml1 update-rc.d ptest
>
>  # internal helper
>  def busybox_cfg(feature, features, tokens, cnf, rem):
> diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb b/meta/recipes-core/busybox/busybox_1.20.2.bb
> index 783261e..b2e5d47 100644
> --- a/meta/recipes-core/busybox/busybox_1.20.2.bb
> +++ b/meta/recipes-core/busybox/busybox_1.20.2.bb
> @@ -28,9 +28,19 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
>             file://fix-for-spurious-testsuite-failure.patch \
>             file://busybox-1.20.2-kernel_ver.patch \
>             file://stat-usr-bin.patch \
> +           file://run-ptest \
>             file://testsuite-du-du-k-works-fix-false-positive.patch"
>
>  SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
>  SRC_URI[tarball.sha256sum] = "eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"
>
>  EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
> +
> +do_install_append () {
> +    if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
> +        ptest_do_install
> +        cp -r ${B}/testsuite ${D}${PTEST_PATH}/
> +        cp ${B}/.config      ${D}${PTEST_PATH}/
> +        ln -s /bin/busybox   ${D}${PTEST_PATH}/busybox
> +    fi
> +}
> diff --git a/meta/recipes-core/busybox/files/run-ptest b/meta/recipes-core/busybox/files/run-ptest
> new file mode 100644
> index 0000000..8eadce9
> --- /dev/null
> +++ b/meta/recipes-core/busybox/files/run-ptest
> @@ -0,0 +1,11 @@
> +#!/bin/sh
> +
> +current_dir="`readlink -f $0`"

quoting the return value of a subshell is a bit arcane. Furthermore
you should nowadays make habit of using $()
current_dir=$(readlink -f $0)

> +export bindir="`dirname $current_dir`"
likewise
> +
> +cd testsuite
> +if [ $? -ne 0 ]; then
> +        exit 1
> +fi

just
cd testsuite || exit 1

> +
> +./runtest -v | sed  -e 's/^SKIPPED:/SKIP:/' | sed -e 's/^UNTESTED:/SKIP:/'

| sed -e 's/^(SKIPPED|UNTESTED):/SKIP:/'

thanks,



^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/8 v2] busybox: Add ptest
  2013-02-19 14:04   ` Bernhard Reutner-Fischer
@ 2013-02-20 14:52     ` Björn Stenberg
  0 siblings, 0 replies; 17+ messages in thread
From: Björn Stenberg @ 2013-02-20 14:52 UTC (permalink / raw)
  To: openembedded-core; +Cc: Daniel Dai

From: Daniel Dai <daniel.dai@enea.com>


Signed-off-by: Björn Stenberg <bjst@enea.com>
---
 meta/recipes-core/busybox/busybox.inc       |    2 +-
 meta/recipes-core/busybox/busybox_1.20.2.bb |   10 ++++++++++
 meta/recipes-core/busybox/files/run-ptest   |    7 +++++++
 3 files changed, 18 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/busybox/files/run-ptest

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index fc6ca91..85851dd 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -37,7 +37,7 @@ CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
 
 RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
 
-inherit cml1 update-rc.d
+inherit cml1 update-rc.d ptest
 
 # internal helper
 def busybox_cfg(feature, features, tokens, cnf, rem):
diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb b/meta/recipes-core/busybox/busybox_1.20.2.bb
index 783261e..b2e5d47 100644
--- a/meta/recipes-core/busybox/busybox_1.20.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.20.2.bb
@@ -28,9 +28,19 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://fix-for-spurious-testsuite-failure.patch \
            file://busybox-1.20.2-kernel_ver.patch \
            file://stat-usr-bin.patch \
+           file://run-ptest \
            file://testsuite-du-du-k-works-fix-false-positive.patch"
 
 SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
 SRC_URI[tarball.sha256sum] = "eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"
 
 EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
+
+do_install_append () {
+    if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+        ptest_do_install
+        cp -r ${B}/testsuite ${D}${PTEST_PATH}/
+        cp ${B}/.config      ${D}${PTEST_PATH}/
+        ln -s /bin/busybox   ${D}${PTEST_PATH}/busybox
+    fi
+}
diff --git a/meta/recipes-core/busybox/files/run-ptest b/meta/recipes-core/busybox/files/run-ptest
new file mode 100644
index 0000000..3608a8e
--- /dev/null
+++ b/meta/recipes-core/busybox/files/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+current_dir=$(readlink -f $0)
+export bindir=$(dirname $current_dir)
+
+cd testsuite || exit 1
+./runtest -v | sed -r 's/^(SKIPPED|UNTESTED):/SKIP:/'
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/8] udev: Add ptest
  2013-02-19 13:13 ` [PATCH 3/8] udev: " Björn Stenberg
@ 2013-02-21  6:55   ` Saul Wold
  0 siblings, 0 replies; 17+ messages in thread
From: Saul Wold @ 2013-02-21  6:55 UTC (permalink / raw)
  To: Björn Stenberg; +Cc: jack zhang, openembedded-core

On 02/19/2013 05:13 AM, Björn Stenberg wrote:
> From: jack zhang <jack.zhang@enea.com>
>
>
> Signed-off-by: Björn Stenberg <bjst@enea.com>
> ---
>   meta/recipes-core/udev/udev.inc                    |   19 ++++++-
>   .../recipes-core/udev/udev/add-install-ptest.patch |   60 ++++++++++++++++++++
>   meta/recipes-core/udev/udev/run-ptest              |    3 +
>   3 files changed, 80 insertions(+), 2 deletions(-)
>   create mode 100644 meta/recipes-core/udev/udev/add-install-ptest.patch
>   create mode 100755 meta/recipes-core/udev/udev/run-ptest
>

Seems this one needs to be rebased against master

Sau!

> diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc
> index facad0c..8c26eee 100644
> --- a/meta/recipes-core/udev/udev.inc
> +++ b/meta/recipes-core/udev/udev.inc
> @@ -27,9 +27,12 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
>              file://local.rules \
>              file://udev-cache \
>              file://udev-cache.default \
> -           file://init"
> +           file://init \
> +           file://add-install-ptest.patch \
> +           file://run-ptest \
> +          "
>
> -inherit autotools pkgconfig update-rc.d
> +inherit autotools pkgconfig update-rc.d ptest
>
>   # udevd/udevadm -> /sbin/, libudev.so.* -> /lib/
>   sbindir = "${base_sbindir}"
> @@ -105,3 +108,15 @@ python () {
>       if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
>           raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
>   }
> +
> +do_compile_append() {
> +    if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
> +        oe_runmake test-udev
> +    fi
> +}
> +
> +do_install_append() {
> +    if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
> +        ptest_do_install
> +    fi
> +}
> diff --git a/meta/recipes-core/udev/udev/add-install-ptest.patch b/meta/recipes-core/udev/udev/add-install-ptest.patch
> new file mode 100644
> index 0000000..db6cf17
> --- /dev/null
> +++ b/meta/recipes-core/udev/udev/add-install-ptest.patch
> @@ -0,0 +1,60 @@
> +Adjustements for ptest:
> +
> +- Add 'install-ptest' rule.
> +- Print a standard result line for each test.
> +- Replace the use of "tree" with "find".
> +
> +Signed-off-by: Björn Stenberg <bjst@enea.com>
> +Upstream-status: Pending
> +
> +--- a/Makefile.am	2012-03-18 16:28:14.000000000 +0100
> ++++ b/Makefile.am	2013-02-18 10:03:36.531101244 +0100
> +@@ -708,3 +708,11 @@
> + 	for i in src/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/libudev/; done
> + 	for i in src/gudev/docs/html/*.{html,css,png}; do rm -f $$i.sign; gpg --armor --detach-sign --output=$$i.sign $$i; done
> + 	for i in src/gudev/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/gudev/; done
> ++
> ++install-ptest:
> ++	install test-udev $(DESTDIR)
> ++	cp Makefile $(DESTDIR)
> ++	sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
> ++	$(MKDIR_P) $(DESTDIR)/test
> ++	install $(TESTS) $(DESTDIR)/test
> ++	tar -C $(DESTDIR)/test/ -xJf $(top_srcdir)/test/sys.tar.xz
> +--- a/test/udev-test.pl	2012-03-18 16:43:36.000000000 +0100
> ++++ b/test/udev-test.pl	2013-02-18 10:31:29.706357321 +0100
> +@@ -1459,11 +1459,13 @@
> +                 print "add:         error";
> +                 if ($rules->{exp_add_error}) {
> +                         print " as expected\n";
> ++                        print "XFAIL: TEST $number: $rules->{desc}: add\n";
> +                 } else {
> +                         print "\n";
> +-                        system("tree $udev_root");
> ++                        system("find $udev_root");
> +                         print "\n";
> +                         $error++;
> ++                        print "FAIL: TEST $number: $rules->{desc}: add\n";
> +                         sleep(1);
> +                 }
> +         }
> +@@ -1479,15 +1481,18 @@
> +                 print "remove:      error";
> +                 if ($rules->{exp_rem_error}) {
> +                         print " as expected\n";
> ++                        print "XFAIL: TEST $number: $rules->{desc}: remove\n";
> +                 } else {
> +                         print "\n";
> +-                        system("tree $udev_root");
> ++                        system("find $udev_root");
> +                         print "\n";
> +                         $error++;
> ++                        print "FAIL: TEST $number: $rules->{desc}: remove\n";
> +                         sleep(1);
> +                 }
> +         } else {
> +                 print "remove:      ok\n";
> ++                print "PASS: TEST $number: $rules->{desc}: remove\n";
> +         }
> +
> +         print "\n";
> diff --git a/meta/recipes-core/udev/udev/run-ptest b/meta/recipes-core/udev/udev/run-ptest
> new file mode 100755
> index 0000000..6817ef7
> --- /dev/null
> +++ b/meta/recipes-core/udev/udev/run-ptest
> @@ -0,0 +1,3 @@
> +#!/bin/sh
> +
> +make -k check-TESTS
> \ No newline at end of file
>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/8] acl: Add ptest
  2013-02-19 13:14 ` [PATCH 4/8] acl: " Björn Stenberg
@ 2013-02-22 13:59   ` Richard Purdie
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Purdie @ 2013-02-22 13:59 UTC (permalink / raw)
  To: Björn Stenberg; +Cc: Rick.Yang, openembedded-core

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




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/8] zlib: Add ptest
  2013-02-19 13:13 ` [PATCH 2/8] zlib: " Björn Stenberg
@ 2013-02-22 14:02   ` Richard Purdie
  2013-02-22 15:56     ` Björn Stenberg
  0 siblings, 1 reply; 17+ messages in thread
From: Richard Purdie @ 2013-02-22 14:02 UTC (permalink / raw)
  To: Björn Stenberg; +Cc: Anders Roxell, openembedded-core

On Tue, 2013-02-19 at 14:13 +0100, Björn Stenberg wrote:
> From: Anders Roxell <anders.roxell@enea.com>
> 
> Signed-off-by: Björn Stenberg <bjst@enea.com>
> Signed-off-by: Anders Roxell <anders.roxell@enea.com>
> ---
>  .../zlib/zlib-1.2.7/Makefile-runtests.patch        |   38 ++++++++++++++++++++
>  meta/recipes-core/zlib/zlib-1.2.7/run-ptest        |    7 ++++
>  meta/recipes-core/zlib/zlib_1.2.7.bb               |   22 +++++++++++
>  3 files changed, 67 insertions(+), 0 deletions(-)
>  create mode 100644 meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch
>  create mode 100644 meta/recipes-core/zlib/zlib-1.2.7/run-ptest
> 
> diff --git a/meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch b/meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch
> new file mode 100644
> index 0000000..04c55b4
> --- /dev/null
> +++ b/meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch
> @@ -0,0 +1,38 @@
> +Add 'ptest' target to Makefile, to run tests without checking dependencies.
> +
> +Signed-off-by: Anders Roxell <anders.roxell@enea.com>
> +Upstream-Status: Pending
> +---
> +diff -uNr a/Makefile.in b/Makefile.in
> +--- a/Makefile.in	2012-04-23 07:58:06.000000000 +0200
> ++++ b/Makefile.in	2012-10-24 08:24:19.822544837 +0200
> +@@ -83,6 +83,9 @@
> + test: all teststatic testshared
> + 
> + teststatic: static
> ++	@make runteststatic
> ++
> ++runteststatic:
> + 	@TMPST=`mktemp fooXXXXXX`; \
> + 	if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
> + 	  echo '		*** zlib test OK ***'; \
> +@@ -92,6 +95,9 @@
> + 	rm -f $$TMPST
> + 
> + testshared: shared
> ++	@make runtestshared
> ++
> ++runtestshared:
> + 	@LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
> + 	LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
> + 	DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
> +@@ -105,6 +111,9 @@
> + 	rm -f $$TMPSH
> + 
> + test64: all64
> ++	@make runtest64
> ++
> ++runtest64:
> + 	@TMP64=`mktemp fooXXXXXX`; \
> + 	if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
> + 	  echo '		*** zlib 64-bit test OK ***'; \
> diff --git a/meta/recipes-core/zlib/zlib-1.2.7/run-ptest b/meta/recipes-core/zlib/zlib-1.2.7/run-ptest
> new file mode 100644
> index 0000000..19d9632
> --- /dev/null
> +++ b/meta/recipes-core/zlib/zlib-1.2.7/run-ptest
> @@ -0,0 +1,7 @@
> +#!/bin/sh
> +FILE=zlib-ptest-$$.log
> +make -k runteststatic runtestshared > $FILE
> +sed -i -r -e 's/^(\s+\*+ (.+?) test OK \*+)/\1\nPASS: \2/' $FILE
> +sed -i -r -e 's/^(\s+\*+ (.+?) test FAILED \*+)/\1\nFAIL: \2/' $FILE
> +cat $FILE
> +rm -f $FILE
> diff --git a/meta/recipes-core/zlib/zlib_1.2.7.bb b/meta/recipes-core/zlib/zlib_1.2.7.bb
> index 803fec3..61380ec 100644
> --- a/meta/recipes-core/zlib/zlib_1.2.7.bb
> +++ b/meta/recipes-core/zlib/zlib_1.2.7.bb
> @@ -8,20 +8,42 @@ LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=94d1b5a40dadd127f33
>  
>  SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.bz2 \
>             file://remove.ldconfig.call.patch \
> +           file://Makefile-runtests.patch \
> +           file://run-ptest \
>             "
>  SRC_URI[md5sum] = "2ab442d169156f34c379c968f3f482dd"
>  SRC_URI[sha256sum] = "49e2e9658dfb036900da6ea0267a737fa3c4eee6666776d378c79d52e9334934"
>  
> +RDEPENDS_${PN}-ptest += "make"
> +RDEPENDS_${PN}-ptest_virtclass-native = ""
> +RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""

The above scares me. Why? This is going to make packaging of zlib
dependent on the packaging of make, due to the way our packaging works.
This means zlib will force make to get built. I need to confirmation at
this point that if ptest isn't enabled, this dependency isn't used.

I also wonder if the make dependency itself isn't best left against the
main ptest-runner script itself rather and each ptest package.

I'd like to protect build performance a bit if I can help it.

> +FILES_${PN}-dbg += "${PTEST_PATH}/.debug"

Is this needed after the other fix?

Cheers,

Richard




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 7/8] openssl: Add ptest
  2013-02-19 13:14 ` [PATCH 7/8] openssl: " Björn Stenberg
@ 2013-02-22 14:05   ` Richard Purdie
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Purdie @ 2013-02-22 14:05 UTC (permalink / raw)
  To: Björn Stenberg; +Cc: openembedded-core

On Tue, 2013-02-19 at 14:14 +0100, Björn Stenberg wrote:
> Signed-off-by: Björn Stenberg <bjst@enea.com>
> ---
>  .../openssl/openssl-1.0.0j/Makefiles-ptest.patch   |   74 ++++++++++++++++++++
>  .../openssl/openssl-1.0.0j/run-ptest               |    2 +
>  meta/recipes-connectivity/openssl/openssl.inc      |   19 +++++-
>  .../recipes-connectivity/openssl/openssl_1.0.0j.bb |    2 +
>  4 files changed, 96 insertions(+), 1 deletions(-)
>  create mode 100644 meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
>  create mode 100644 meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest
> 
> diff --git a/meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch b/meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
> new file mode 100644
> index 0000000..e65f17b
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
> @@ -0,0 +1,74 @@
> +Add 'buildtest' and 'runtest' targets to Makefile, to build and run tests
> +cross-compiled.
> +
> +Signed-off-by: Anders Roxell <anders.roxell@enea.com>
> +Upstream-Status: Pending
> +---
> +diff -uNr a/Makefile b/Makefile
> +--- a/Makefile.org	2012-05-10 17:06:02.000000000 +0200
> ++++ b/Makefile.org	2012-10-27 00:05:55.359424024 +0200
> +@@ -411,8 +411,16 @@
> + test:   tests
> + 
> + tests: rehash
> ++	$(MAKE) buildtest
> ++	$(MAKE) runtest
> ++
> ++buildtest:
> ++	@(cd test && \
> ++	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf exe apps);
> ++
> ++runtest:
> + 	@(cd test && echo "testing..." && \
> +-	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
> ++	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf alltests );
> + 	OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
> + 
> + report:
> +diff --git a/test/Makefile b/test/Makefile
> +index 3912f82..1696767 100644
> +--- a/test/Makefile
> ++++ b/test/Makefile
> +@@ -128,7 +128,7 @@ tests:	exe apps $(TESTS)
> + apps:
> + 	@(cd ..; $(MAKE) DIRS=apps all)
> + 
> +-alltests: \
> ++all-tests= \
> + 	test_des test_idea test_sha test_md4 test_md5 test_hmac \
> + 	test_md2 test_mdc2 test_wp \
> + 	test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_aes \
> +@@ -138,6 +138,11 @@ alltests: \
> + 	test_ss test_ca test_engine test_evp test_ssl test_tsa test_ige \
> + 	test_jpake test_cms
> + 
> ++alltests:
> ++	@(for i in $(all-tests); do \
> ++	( $(MAKE) $$i && echo "PASS: $$i" ) || echo "FAIL: $$i"; \
> ++	done)
> ++
> + test_evp:
> + 	../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt
> + 
> +@@ -203,7 +208,7 @@ test_x509:
> + 	echo test second x509v3 certificate
> + 	sh ./tx509 v3-cert2.pem 2>/dev/null
> + 
> +-test_rsa: $(RSATEST)$(EXE_EXT)
> ++test_rsa:
> + 	@sh ./trsa 2>/dev/null
> + 	../util/shlib_wrap.sh ./$(RSATEST)
> + 
> +@@ -298,11 +303,11 @@ test_tsa:
> + 	  sh ./testtsa; \
> + 	fi
> + 
> +-test_ige: $(IGETEST)$(EXE_EXT)
> ++test_ige:
> + 	@echo "Test IGE mode"
> + 	../util/shlib_wrap.sh ./$(IGETEST)
> + 
> +-test_jpake: $(JPAKETEST)$(EXE_EXT)
> ++test_jpake:
> + 	@echo "Test JPAKE"
> + 	../util/shlib_wrap.sh ./$(JPAKETEST)
> diff --git a/meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest b/meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest
> new file mode 100644
> index 0000000..3b20fce
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest
> @@ -0,0 +1,2 @@
> +#!/bin/sh
> +make -k runtest
> diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
> index e1e7b65..62acf95 100644
> --- a/meta/recipes-connectivity/openssl/openssl.inc
> +++ b/meta/recipes-connectivity/openssl/openssl.inc
> @@ -33,7 +33,7 @@ export DIRS = "crypto ssl apps"
>  export EX_LIBS = "-lgcc -ldl"
>  export AS = "${CC} -c"
>  
> -inherit pkgconfig siteinfo
> +inherit pkgconfig siteinfo ptest
>  
>  PACKAGES =+ "libcrypto libssl ${PN}-misc"
>  FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}"
> @@ -42,6 +42,8 @@ FILES_${PN} =+ " ${libdir}/ssl/*"
>  FILES_${PN}-misc = "${libdir}/ssl/misc ${libdir}/ssl/openssl.cnf"
>  FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
>  
> +RDEPENDS_${PN}-ptest = "openssl-misc"
> +
>  do_configure_prepend_darwin () {
>  	sed -i -e '/version-script=openssl\.ld/d' Configure
>  }
> @@ -125,6 +127,9 @@ do_configure () {
>  
>  do_compile () {
>  	oe_runmake
> +	if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ] ; then
> +	    oe_runmake buildtest
> +	fi
>  }

Final comment for now is these if checks are annoying and likely plain
wrong. I think you're trying to avoid the -native case, if so, just set
PTEST_ENABLED = 0 in native.bbclass and maybe nativesdk.bbclass
(although it would probably work there). How is this expected to work in
the multilib case? 

Cheers,

Richard




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/8] zlib: Add ptest
  2013-02-22 14:02   ` Richard Purdie
@ 2013-02-22 15:56     ` Björn Stenberg
  2013-02-22 17:39       ` Richard Purdie
  0 siblings, 1 reply; 17+ messages in thread
From: Björn Stenberg @ 2013-02-22 15:56 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Anders Roxell, openembedded-core

Richard Purdie wrote:
> > +RDEPENDS_${PN}-ptest += "make"
> > +RDEPENDS_${PN}-ptest_virtclass-native = ""
> > +RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
> 
> The above scares me. Why? This is going to make packaging of zlib
> dependent on the packaging of make, due to the way our packaging works.

Will it? The intention is to specify that make is only required for running zlib-ptest (and only on target). We do a similar RDEPENDS-ptest declaration in glib-2.0, adding some tzdata and python packages.

I must admit to not building without ptest very often, but I was under the impression this works as intended.

> I also wonder if the make dependency itself isn't best left against the
> main ptest-runner script itself rather and each ptest package.

While make is used by many test suites and could be added to ptest-runnner to reduce clutter in other recipes, I think it is the wrong thing to do. You don't have to install ptest-runner to run ptests, it is merely a convenience script that makes it easier to run all of them at once.

Also, make is not the only package required by test suites. For example the gcc-runtime test suite I'll be submitting soon depends on dejagnu (which depends on expect, which depends on tcl). And others still depend on perl or other largeish packages.

> > +FILES_${PN}-dbg += "${PTEST_PATH}/.debug"
> Is this needed after the other fix?

No, this was a leftover mistake. Thanks for spotting it.

-- 
Björn



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/8] zlib: Add ptest
  2013-02-22 15:56     ` Björn Stenberg
@ 2013-02-22 17:39       ` Richard Purdie
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Purdie @ 2013-02-22 17:39 UTC (permalink / raw)
  To: Björn Stenberg; +Cc: Anders Roxell, openembedded-core

On Fri, 2013-02-22 at 16:56 +0100, Björn Stenberg wrote:
> Richard Purdie wrote:
> > > +RDEPENDS_${PN}-ptest += "make"
> > > +RDEPENDS_${PN}-ptest_virtclass-native = ""
> > > +RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
> > 
> > The above scares me. Why? This is going to make packaging of zlib
> > dependent on the packaging of make, due to the way our packaging works.
> 
> Will it?

It will.

>  The intention is to specify that make is only required for running
> zlib-ptest (and only on target). We do a similar RDEPENDS-ptest
> declaration in glib-2.0, adding some tzdata and python packages.

See below.
> 
> I must admit to not building without ptest very often, but I was under
> the impression this works as intended.

I'm not saying it won't work. What it will do is increase build time,
probably significantly, particularly if we do this a lot. This will not
be acceptable to some.

> > I also wonder if the make dependency itself isn't best left against the
> > main ptest-runner script itself rather and each ptest package.
> 
> While make is used by many test suites and could be added to
> ptest-runnner to reduce clutter in other recipes, I think it is the
> wrong thing to do. You don't have to install ptest-runner to run
> ptests, it is merely a convenience script that makes it easier to run
> all of them at once.
> 
> Also, make is not the only package required by test suites. For
> example the gcc-runtime test suite I'll be submitting soon depends on
> dejagnu (which depends on expect, which depends on tcl). And others
> still depend on perl or other largeish packages.

The issue is that on most system images other than tiny ones, we
probably end up triggering perl/python to build. Most devices don't end
up with make. If we do go this route (and I'm not sure we have any
choice), we need to ensure that the dependencies don't hurt people who
don't want ptest and to try and minimise the performance impact. We at
least need to be aware it will hurt build performance.

Cheers,

Richard





^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-02-22 17:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-19 13:13 [PATCH 0/8] Ptest additions Björn Stenberg
2013-02-19 13:13 ` [PATCH 1/8] busybox: Add ptest Björn Stenberg
2013-02-19 14:04   ` Bernhard Reutner-Fischer
2013-02-20 14:52     ` [PATCH 1/8 v2] " Björn Stenberg
2013-02-19 13:13 ` [PATCH 2/8] zlib: " Björn Stenberg
2013-02-22 14:02   ` Richard Purdie
2013-02-22 15:56     ` Björn Stenberg
2013-02-22 17:39       ` Richard Purdie
2013-02-19 13:13 ` [PATCH 3/8] udev: " Björn Stenberg
2013-02-21  6:55   ` Saul Wold
2013-02-19 13:14 ` [PATCH 4/8] acl: " Björn Stenberg
2013-02-22 13:59   ` Richard Purdie
2013-02-19 13:14 ` [PATCH 5/8] bzip2: " Björn Stenberg
2013-02-19 13:14 ` [PATCH 6/8] openssh: " Björn Stenberg
2013-02-19 13:14 ` [PATCH 7/8] openssl: " Björn Stenberg
2013-02-22 14:05   ` Richard Purdie
2013-02-19 13:14 ` [PATCH 8/8] ptest: Add missed .debug path Björn Stenberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.