Ptest additions
cover Ptest additions
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
Signature · 1 line
1.7.5.4
PATCH 1/8 busybox: Add ptest
From: Daniel Dai <[email protected]>
--- 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
meta/recipes-core/busybox/busybox.inc +1 -1
@@ -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):
meta/recipes-core/busybox/busybox_1.20.2.bb +10 -0
@@ -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 +}
meta/recipes-core/busybox/files/run-ptest new file +11 -0
@@ -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:/'
Signature · 1 line
1.7.5.4
PATCH 2/8 zlib: Add ptest
In reply to Björn StenbergFrom: Anders Roxell <[email protected]>
--- .../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
meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch new file +38 -0
@@ -0,0 +1,38 @@ +Add 'ptest' target to Makefile, to run tests without checking dependencies. + +Signed-off-by: Anders Roxell <[email protected]> +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 ***'; \
meta/recipes-core/zlib/zlib-1.2.7/run-ptest new file +7 -0
@@ -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
meta/recipes-core/zlib/zlib_1.2.7.bb +22 -0
@@ -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"
Signature · 1 line
1.7.5.4
PATCH 3/8 udev: Add ptest
In reply to Björn StenbergFrom: jack zhang <[email protected]>
--- 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
meta/recipes-core/udev/udev.inc +17 -2
@@ -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 +}
meta/recipes-core/udev/udev/add-install-ptest.patch new file +60 -0
60 lines not on this page · raw message
meta/recipes-core/udev/udev/run-ptest new file +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh + +make -k check-TESTS
Signature · 1 line
1.7.5.4
PATCH 4/8 acl: Add ptest
In reply to Björn StenbergFrom: "Rick.Yang" <[email protected]>
--- 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
meta/recipes-support/attr/acl_2.2.51.bb +21 -0
@@ -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 +}
meta/recipes-support/attr/files/add-runtest-target.patch new file +26 -0
@@ -0,0 +1,26 @@ +From 149c3a4f0ba84b4ff94a52029dc89b887dcb6b8c Mon Sep 17 00:00:00 2001 +From: "Rick.Yang" <[email protected]> +Date: Mon, 17 Dec 2012 07:27:39 +0100 +Subject: [PATCH] Add runtest target for ptest. + +Signed-off-by: Rick.Yang <[email protected]> +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 +
meta/recipes-support/attr/files/run-ptest new file +8 -0
@@ -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' +
Signature · 1 line
1.7.5.4
PATCH 6/8 openssh: Add ptest
In reply to Björn Stenberg--- .../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
meta/recipes-connectivity/openssh/openssh-6.1p1/add-test-support-for-busybox.patch new file +61 -0
@@ -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 <[email protected]> +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
meta/recipes-connectivity/openssh/openssh-6.1p1/run-ptest new file +7 -0
@@ -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'
meta/recipes-connectivity/openssh/openssh_6.1p1.bb +10 -1
@@ -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"
Signature · 1 line
1.7.5.4
PATCH 7/8 openssl: Add ptest
In reply to Björn Stenberg--- .../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
meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch new file +74 -0
@@ -0,0 +1,74 @@ +Add 'buildtest' and 'runtest' targets to Makefile, to build and run tests +cross-compiled. + +Signed-off-by: Anders Roxell <[email protected]> +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)
meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest new file +2 -0
@@ -0,0 +1,2 @@ +#!/bin/sh +make -k runtest
meta/recipes-connectivity/openssl/openssl.inc +18 -1
@@ -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"
meta/recipes-connectivity/openssl/openssl_1.0.0j.bb +2 -0
@@ -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"
Signature · 1 line
1.7.5.4
PATCH 5/8 bzip2: Add ptest
In reply to Björn Stenberg--- .../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
meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am +32 -0
@@ -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)
meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest new file +2 -0
@@ -0,0 +1,2 @@ +#!/bin/sh +make -k runtest
meta/recipes-extended/bzip2/bzip2_1.0.6.bb +9 -1
@@ -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}"
Signature · 1 line
1.7.5.4
PATCH 8/8 ptest: Add missed .debug path
In reply to Björn Stenberg--- meta/classes/ptest.bbclass | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
meta/classes/ptest.bbclass +2 -1
@@ -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 \
Signature · 1 line
1.7.5.4
Re: [PATCH 1/8] busybox: Add ptest
In reply to Björn StenbergQuoted 54 lines · Björn Stenberg
From: Daniel Dai <[email protected]>
Signed-off-by Björn Stenberg <[email protected]>--- 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-ptestmeta/recipes-core/busybox/busybox.inc +1
-1@@ -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):meta/recipes-core/busybox/busybox_1.20.2.bb +10
-0@@ -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 +}meta/recipes-core/busybox/files/run-ptest new file +0
-0
meta/recipes-core/busybox/files/run-ptest line 3
Quoted 3 lines
meta/recipes-core/busybox/files/run-ptest new file +3
-0@@ -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)
meta/recipes-core/busybox/files/run-ptest line 4
Quoted 1 line
meta/recipes-core/busybox/files/run-ptest new file +1
-0+export bindir="`dirname $current_dir`"
likewise
meta/recipes-core/busybox/files/run-ptest line 9
Quoted 5 lines
meta/recipes-core/busybox/files/run-ptest new file +5
-0+ +cd testsuite +if [ $? -ne 0 ]; then + exit 1 +fi
just
cd testsuite || exit 1
meta/recipes-core/busybox/files/run-ptest line 11
Quoted 2 lines
meta/recipes-core/busybox/files/run-ptest new file +2
-0+ +./runtest -v | sed -e 's/^SKIPPED:/SKIP:/' | sed -e 's/^UNTESTED:/SKIP:/'
| sed -e 's/^(SKIPPED|UNTESTED):/SKIP:/'
thanks,
PATCH v2 1/8 busybox: Add ptest
From: Daniel Dai <[email protected]>
--- 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
meta/recipes-core/busybox/busybox.inc +1 -1
@@ -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):
meta/recipes-core/busybox/busybox_1.20.2.bb +10 -0
@@ -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 +}
meta/recipes-core/busybox/files/run-ptest new file +7 -0
@@ -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:/'
Signature · 1 line
1.7.5.4
Re: [PATCH 3/8] udev: Add ptest
In reply to Björn StenbergQuoted 12 lines · Björn Stenberg
From: jack zhang <[email protected]>
Signed-off-by Björn Stenberg <[email protected]>--- 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.patchcreate mode 100755 meta/recipes-core/udev/udev/run-ptest
Seems this one needs to be rebased against master
Sau!
Quoted 112 lines
meta/recipes-core/udev/udev.inc +17
-2@@ -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 +}meta/recipes-core/udev/udev/add-install-ptest.patch new file +60
-0@@ -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 <[email protected]> +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";meta/recipes-core/udev/udev/run-ptest new file +3
-0@@ -0,0 +1,3 @@ +#!/bin/sh + +make -k check-TESTS
Re: [PATCH 4/8] acl: Add ptest
In reply to Björn StenbergQuoted 17 lines · Björn Stenberg
From: "Rick.Yang" <[email protected]>
Signed-off-by Björn Stenberg <[email protected]>--- 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-ptestmeta/recipes-support/attr/acl_2.2.51.bb +0
-0
meta/recipes-support/attr/acl_2.2.51.bb PR = "r3" · line 8
Quoted 5 lines
meta/recipes-support/attr/acl_2.2.51.bb +2
-0@@ -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
Re: [PATCH 2/8] zlib: Add ptest
In reply to Björn StenbergQuoted 76 lines · Björn Stenberg
From: Anders Roxell <[email protected]>
Signed-off-by Björn Stenberg <[email protected]>Signed-off-by Anders Roxell <[email protected]>--- .../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-ptestmeta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch new file +38
-0@@ -0,0 +1,38 @@ +Add 'ptest' target to Makefile, to run tests without checking dependencies. + +Signed-off-by: Anders Roxell <[email protected]> +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 ***'; \meta/recipes-core/zlib/zlib-1.2.7/run-ptest new file +7
-0@@ -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 $FILEmeta/recipes-core/zlib/zlib_1.2.7.bb +0
-0@@ -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 \
meta/recipes-core/zlib/zlib_1.2.7.bb LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=94d1b5a40dadd127f33 · line 19
Quoted 10 lines
meta/recipes-core/zlib/zlib_1.2.7.bb +5
-0file://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.
meta/recipes-core/zlib/zlib_1.2.7.bb LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=94d1b5a40dadd127f33 · line 21
Quoted 1 line
meta/recipes-core/zlib/zlib_1.2.7.bb +1
-0+FILES_${PN}-dbg += "${PTEST_PATH}/.debug"
Is this needed after the other fix?
Cheers,
Richard
Re: [PATCH 7/8] openssl: Add ptest
In reply to Björn StenbergQuoted 121 lines · Björn Stenberg
Signed-off-by Björn Stenberg <[email protected]>--- .../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-ptestmeta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch new file +74
-0@@ -0,0 +1,74 @@ +Add 'buildtest' and 'runtest' targets to Makefile, to build and run tests +cross-compiled. + +Signed-off-by: Anders Roxell <[email protected]> +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)meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest new file +2
-0@@ -0,0 +1,2 @@ +#!/bin/sh +make -k runtestmeta/recipes-connectivity/openssl/openssl.inc +3
-1@@ -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 }
meta/recipes-connectivity/openssl/openssl.inc do_configure () { · line 133
Quoted 7 lines
meta/recipes-connectivity/openssl/openssl.inc +3
-0@@ -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
Re: [PATCH 2/8] zlib: Add ptest
In reply to Richard PurdieQuoted 6 lines · Richard Purdie
meta/recipes-core/zlib/zlib_1.2.7.bb LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=94d1b5a40dadd127f33 · line 19
Quoted 3 lines
meta/recipes-core/zlib/zlib_1.2.7.bb +3
-0+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.
Quoted 2 lines
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.
Quoted 2 lines
Quoted 1 line
+FILES_${PN}-dbg += "${PTEST_PATH}/.debug"
Is this needed after the other fix?
No, this was a leftover mistake. Thanks for spotting it.
Signature · 1 line
Björn
Re: [PATCH 2/8] zlib: Add ptest
Quoted 9 lines · Björn Stenberg
Quoted 6 lines · Richard Purdie
meta/recipes-core/zlib/zlib_1.2.7.bb LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=94d1b5a40dadd127f33 · line 19
Quoted 3 lines
meta/recipes-core/zlib/zlib_1.2.7.bb +3
-0+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.
Quoted 3 lines
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.
Quoted 3 lines
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.
Quoted 9 lines
Quoted 2 lines
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.
Quoted 4 lines
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