[OE-core] [meta-oe][PATCH V2] tar: add ptest support
From: yanxk original test suites takes 5 minutes with KVM enabled. autotest files would contain reference to TMPDIR, now they are removed. tar test would provide ptest output like: PASS: compressor program failure SKIP: remove-files with compression PASS: remove-files with compression: grand-child be aware tar tests contain some large compression and decompression tests that require large device storage. those cases would not work fine in default qemu image, for the default storage is too small. Some errors: listing sparse files bigger than 2^33 B./testsuite: line 1928: echo: write error: No space left on device they are hard coded in the original test scripts, no modifications have been made to that yet. Signed-off-by: yanxk --- .../distro/include/ptest-packagelists.inc | 1 + meta/recipes-extended/tar/tar-1.34/run-ptest | 10 ++ meta/recipes-extended/tar/tar_1.34.bb | 31 +-- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/tar/tar-1.34/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 0681b4b7a2..139fbc4a03 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -102,6 +102,7 @@ PTESTS_SLOW = "\ python3-cryptography-ptest \ python3-ptest \ strace-ptest \ +tar-ptest \ tcl-ptest \ util-linux-ptest \ valgrind-ptest \ diff --git a/meta/recipes-extended/tar/tar-1.34/run-ptest b/meta/recipes-extended/tar/tar-1.34/run-ptest new file mode 100644 index 00..9ca27153d9 --- /dev/null +++ b/meta/recipes-extended/tar/tar-1.34/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +# Define tar test work dir +WORKDIR=/usr/lib/tar/ptest/tests/ + +# Run test +cd ${WORKDIR} +./atconfig ./atlocal ./testsuite + +./testsuite 2>&1 | grep -E '[0-9]{1,3}: ' | sed -e 's/^.//' -e '/[ok]$/s/^/PASS: /;/FAILED (.*)/s/^/FAIL: /;/skipped (.*)/s/^/SKIP: /;/expected failure/ s/^/PASS: /;/UNEXPECTED PASS/s/^/FAIL: /' -e 's/ok$//g' -e 's/FAILED.*//g' -e 's/skipped.*//g' -e 's/expected failure.*//g' -e 's/UNEXPECTED PASS.*//g' diff --git a/meta/recipes-extended/tar/tar_1.34.bb b/meta/recipes-extended/tar/tar_1.34.bb index 7307cd57a2..ce319f6e7a 100644 --- a/meta/recipes-extended/tar/tar_1.34.bb +++ b/meta/recipes-extended/tar/tar_1.34.bb @@ -6,11 +6,13 @@ SECTION = "base" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" +SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \ + file://run-ptest \ +" SRC_URI[sha256sum] = "b44cc67f8a1f6b0250b7c860e952b37e8ed932a90bd9b1862a511079255646ff" -inherit autotools gettext texinfo +inherit autotools gettext texinfo ptest PACKAGECONFIG ??= "" PACKAGECONFIG:append:class-target = " ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}" @@ -42,6 +44,31 @@ do_install:append:class-target() { fi } +# Tar testsuite would generate some small tests that are bash +# scripts, so set ptest dependency to bash + +RDEPENDS:${PN}-ptest += "bash" + +do_compile_ptest() { +oe_runmake -C ${B}/gnu/ check +oe_runmake -C ${B}/lib/ check +oe_runmake -C ${B}/rmt/ check +oe_runmake -C ${B}/src/ check +oe_runmake -C ${B}/tests/ genfile checkseekhole ckmtime +} + +do_install_ptest() { +install -d ${D}${PTEST_PATH}/tests/ +sed -i "/abs_/d" ${B}/tests/atconfig +install --mode=755 ${B}/tests/atconfig ${D}${PTEST_PATH}/tests/ +sed -i "s%${B}/../tar-1.34.build-aux:%%g" ${B}/tests/atlocal +install --mode=755 ${B}/tests/atlocal ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/genfile ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/checkseekhole ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/ckmtime ${D}${PTEST_PATH}/tests/ +install --mode=755 ${S}/tests/testsuite ${D}${PTEST_PATH}/tests/ +} + PACKAGES =+ "${PN}-rmt" FILES:${PN}-rmt = "${sbindir}/rmt*" -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#181225): https://lists.openembedded.org/g/openembedded-core/message/181225 Mute This Topic: https://lists.openembedded.org/mt/98896858/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [meta-oe][PATCH V2] tar: add ptest support
From: yanxk original test suites takes 5 minutes with KVM enabled. autotest files would contain reference to TMPDIR, now they are removed. tar test would provide ptest output like: PASS: compressor program failure SKIP: remove-files with compression PASS: remove-files with compression: grand-child be aware tar tests contain some large compression and decompression tests that require large device storage. those cases would not work fine in default qemu image, for the default storage is too small. Some errors: listing sparse files bigger than 2^33 B./testsuite: line 1928: echo: write error: No space left on device they are hard coded in the original test scripts, no modifications have been made to that yet. Signed-off-by: yanxk --- .../distro/include/ptest-packagelists.inc | 1 + meta/recipes-extended/tar/tar-1.34/run-ptest | 10 ++ meta/recipes-extended/tar/tar_1.34.bb | 31 +-- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/tar/tar-1.34/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 0681b4b7a2..139fbc4a03 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -102,6 +102,7 @@ PTESTS_SLOW = "\ python3-cryptography-ptest \ python3-ptest \ strace-ptest \ +tar-ptest \ tcl-ptest \ util-linux-ptest \ valgrind-ptest \ diff --git a/meta/recipes-extended/tar/tar-1.34/run-ptest b/meta/recipes-extended/tar/tar-1.34/run-ptest new file mode 100644 index 00..9ca27153d9 --- /dev/null +++ b/meta/recipes-extended/tar/tar-1.34/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +# Define tar test work dir +WORKDIR=/usr/lib/tar/ptest/tests/ + +# Run test +cd ${WORKDIR} +./atconfig ./atlocal ./testsuite + +./testsuite 2>&1 | grep -E '[0-9]{1,3}: ' | sed -e 's/^.//' -e '/[ok]$/s/^/PASS: /;/FAILED (.*)/s/^/FAIL: /;/skipped (.*)/s/^/SKIP: /;/expected failure/ s/^/PASS: /;/UNEXPECTED PASS/s/^/FAIL: /' -e 's/ok$//g' -e 's/FAILED.*//g' -e 's/skipped.*//g' -e 's/expected failure.*//g' -e 's/UNEXPECTED PASS.*//g' diff --git a/meta/recipes-extended/tar/tar_1.34.bb b/meta/recipes-extended/tar/tar_1.34.bb index 7307cd57a2..ce319f6e7a 100644 --- a/meta/recipes-extended/tar/tar_1.34.bb +++ b/meta/recipes-extended/tar/tar_1.34.bb @@ -6,11 +6,13 @@ SECTION = "base" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" +SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \ + file://run-ptest \ +" SRC_URI[sha256sum] = "b44cc67f8a1f6b0250b7c860e952b37e8ed932a90bd9b1862a511079255646ff" -inherit autotools gettext texinfo +inherit autotools gettext texinfo ptest PACKAGECONFIG ??= "" PACKAGECONFIG:append:class-target = " ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}" @@ -42,6 +44,31 @@ do_install:append:class-target() { fi } +# Tar testsuite would generate some small tests that are bash +# scripts, so set ptest dependency to bash + +RDEPENDS:${PN}-ptest += "bash" + +do_compile_ptest() { +oe_runmake -C ${B}/gnu/ check +oe_runmake -C ${B}/lib/ check +oe_runmake -C ${B}/rmt/ check +oe_runmake -C ${B}/src/ check +oe_runmake -C ${B}/tests/ genfile checkseekhole ckmtime +} + +do_install_ptest() { +install -d ${D}${PTEST_PATH}/tests/ +sed -i "/abs_/d" ${B}/tests/atconfig +install --mode=755 ${B}/tests/atconfig ${D}${PTEST_PATH}/tests/ +sed -i "s%${B}/../tar-1.34.build-aux:%%g" ${B}/tests/atlocal +install --mode=755 ${B}/tests/atlocal ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/genfile ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/checkseekhole ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/ckmtime ${D}${PTEST_PATH}/tests/ +install --mode=755 ${S}/tests/testsuite ${D}${PTEST_PATH}/tests/ +} + PACKAGES =+ "${PN}-rmt" FILES:${PN}-rmt = "${sbindir}/rmt*" -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#181224): https://lists.openembedded.org/g/openembedded-core/message/181224 Mute This Topic: https://lists.openembedded.org/mt/98896858/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [meta-oe][PATCH V2] tar: add ptest support
From: yanxk original test suites takes 5 minutes with KVM enabled. autotest files would contain reference to TMPDIR, now they are removed. tar test would provide ptest output like: PASS: compressor program failure SKIP: remove-files with compression PASS: remove-files with compression: grand-child be aware tar tests contain some large compression and decompression tests that require large device storage. those cases would not work fine in default qemu image, for the default storage is too small. Some errors: listing sparse files bigger than 2^33 B./testsuite: line 1928: echo: write error: No space left on device they are hard coded in the original test scripts, no modifications have been made to that yet. Signed-off-by: yanxk --- .../distro/include/ptest-packagelists.inc | 1 + meta/recipes-extended/tar/tar-1.34/run-ptest | 10 ++ meta/recipes-extended/tar/tar_1.34.bb | 31 +-- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/tar/tar-1.34/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 0681b4b7a2..139fbc4a03 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -102,6 +102,7 @@ PTESTS_SLOW = "\ python3-cryptography-ptest \ python3-ptest \ strace-ptest \ +tar-ptest \ tcl-ptest \ util-linux-ptest \ valgrind-ptest \ diff --git a/meta/recipes-extended/tar/tar-1.34/run-ptest b/meta/recipes-extended/tar/tar-1.34/run-ptest new file mode 100644 index 00..9ca27153d9 --- /dev/null +++ b/meta/recipes-extended/tar/tar-1.34/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +# Define tar test work dir +WORKDIR=/usr/lib/tar/ptest/tests/ + +# Run test +cd ${WORKDIR} +./atconfig ./atlocal ./testsuite + +./testsuite 2>&1 | grep -E '[0-9]{1,3}: ' | sed -e 's/^.//' -e '/[ok]$/s/^/PASS: /;/FAILED (.*)/s/^/FAIL: /;/skipped (.*)/s/^/SKIP: /;/expected failure/ s/^/PASS: /;/UNEXPECTED PASS/s/^/FAIL: /' -e 's/ok$//g' -e 's/FAILED.*//g' -e 's/skipped.*//g' -e 's/expected failure.*//g' -e 's/UNEXPECTED PASS.*//g' diff --git a/meta/recipes-extended/tar/tar_1.34.bb b/meta/recipes-extended/tar/tar_1.34.bb index 7307cd57a2..ce319f6e7a 100644 --- a/meta/recipes-extended/tar/tar_1.34.bb +++ b/meta/recipes-extended/tar/tar_1.34.bb @@ -6,11 +6,13 @@ SECTION = "base" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" +SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \ + file://run-ptest \ +" SRC_URI[sha256sum] = "b44cc67f8a1f6b0250b7c860e952b37e8ed932a90bd9b1862a511079255646ff" -inherit autotools gettext texinfo +inherit autotools gettext texinfo ptest PACKAGECONFIG ??= "" PACKAGECONFIG:append:class-target = " ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}" @@ -42,6 +44,31 @@ do_install:append:class-target() { fi } +# Tar testsuite would generate some small tests that are bash +# scripts, so set ptest dependency to bash + +RDEPENDS:${PN}-ptest += "bash" + +do_compile_ptest() { +oe_runmake -C ${B}/gnu/ check +oe_runmake -C ${B}/lib/ check +oe_runmake -C ${B}/rmt/ check +oe_runmake -C ${B}/src/ check +oe_runmake -C ${B}/tests/ genfile checkseekhole ckmtime +} + +do_install_ptest() { +install -d ${D}${PTEST_PATH}/tests/ +sed -i "/abs_/d" ${B}/tests/atconfig +install --mode=755 ${B}/tests/atconfig ${D}${PTEST_PATH}/tests/ +sed -i "s%${B}/../tar-1.34.build-aux:%%g" ${B}/tests/atlocal +install --mode=755 ${B}/tests/atlocal ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/genfile ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/checkseekhole ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/ckmtime ${D}${PTEST_PATH}/tests/ +install --mode=755 ${S}/tests/testsuite ${D}${PTEST_PATH}/tests/ +} + PACKAGES =+ "${PN}-rmt" FILES:${PN}-rmt = "${sbindir}/rmt*" -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#177180): https://lists.openembedded.org/g/openembedded-core/message/177180 Mute This Topic: https://lists.openembedded.org/mt/96975703/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [meta-oe][PATCH V2] cpio: add ptest.
From: yanxk add ptest function for oss 'cpio'. this test takes less than 1 second with kvm enabled, so it is a fast test. autotest files would contain TMPDIR, they are removed from script files atconfig and atlocal. Signed-off-by: yanxk --- .../distro/include/ptest-packagelists.inc | 1 + .../recipes-extended/cpio/cpio-2.13/run-ptest | 10 + meta/recipes-extended/cpio/cpio_2.13.bb | 22 ++- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/cpio/cpio-2.13/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 5422ecd378..0681b4b7a2 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -12,6 +12,7 @@ PTESTS_FAST = "\ bc-ptest \ bluez5-ptest \ busybox-ptest \ +cpio-ptest \ diffstat-ptest \ diffutils-ptest \ ethtool-ptest \ diff --git a/meta/recipes-extended/cpio/cpio-2.13/run-ptest b/meta/recipes-extended/cpio/cpio-2.13/run-ptest new file mode 100644 index 00..bdac7259c1 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.13/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +# Define cpio test work dir +WORKDIR=/usr/lib/cpio/ptest/tests/ + +# Run test +cd ${WORKDIR} +./atconfig ./atlocal ./testsuite + +./testsuite 2>&1 | grep -E '[0-9]{1,3}: ' | sed -e 's/^.//' -e '/[ok]$/s/^/PASS: /;/FAILED (.*)/s/^/FAIL: /;/skipped (.*)/s/^/SKIP: /;/expected failure/ s/^/PASS: /;/UNEXPECTED PASS/s/^/FAIL: /' -e 's/ok$//g' -e 's/FAILED.*//g' -e 's/skipped.*//g' -e 's/expected failure.*//g' -e 's/UNEXPECTED PASS.*//g' diff --git a/meta/recipes-extended/cpio/cpio_2.13.bb b/meta/recipes-extended/cpio/cpio_2.13.bb index eb3dc138a9..7a3c8b308b 100644 --- a/meta/recipes-extended/cpio/cpio_2.13.bb +++ b/meta/recipes-extended/cpio/cpio_2.13.bb @@ -12,12 +12,13 @@ SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \ file://0001-obstack-Fix-a-clang-warning.patch \ file://CVE-2021-38185.patch \ file://0001-Use-__alignof__-with-clang.patch \ + file://run-ptest \ " SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810" SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88" -inherit autotools gettext texinfo +inherit autotools gettext texinfo ptest # Issue applies to use of cpio in SUSE/OBS, doesn't apply to us CVE_CHECK_IGNORE += "CVE-2010-4226" @@ -38,6 +39,25 @@ do_install () { mv "${D}${mandir}/man8/rmt.8" "${D}${mandir}/man8/rmt-cpio.8" } +do_compile_ptest() { +oe_runmake -C ${B}/gnu/ check +oe_runmake -C ${B}/lib/ check +oe_runmake -C ${B}/rmt/ check +oe_runmake -C ${B}/src/ check +oe_runmake -C ${B}/tests/ genfile +} + +do_install_ptest() { +install -d ${D}${PTEST_PATH}/tests/ +sed -i "/abs_/d" ${B}/tests/atconfig +install --mode=755 ${B}/tests/atconfig ${D}${PTEST_PATH}/tests/ +sed -i "s%${B}/tests:%%g" ${B}/tests/atlocal +sed -i "s%${B}/src:%%g" ${B}/tests/atlocal +install --mode=755 ${B}/tests/atlocal ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/genfile ${D}${PTEST_PATH}/tests/ +install --mode=755 ${S}/tests/testsuite ${D}${PTEST_PATH}/tests/ +} + PACKAGES =+ "${PN}-rmt" FILES:${PN}-rmt = "${sbindir}/rmt*" -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#176917): https://lists.openembedded.org/g/openembedded-core/message/176917 Mute This Topic: https://lists.openembedded.org/mt/96848761/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
回复: [OE-core] [meta-oe][PATCH V1] cpio: add ptest
Thanks, I will take a closer look into them. Best, Yan -邮件原件- 发件人: Luca Ceresoli 发送时间: 2023年2月8日 1:44 收件人: Luca Ceresoli via lists.openembedded.org 抄送: luca.ceres...@bootlin.com; Yan, Xinkuan/晏 新宽 ; openembedded-core@lists.openembedded.org; FNST fnstml-fujitsuten 主题: Re: [OE-core] [meta-oe][PATCH V1] cpio: add ptest Hello Yan, On Tue, 7 Feb 2023 18:26:27 +0100 "Luca Ceresoli via lists.openembedded.org" wrote: > Hello Yan, > > On Wed, 2 Nov 2022 09:35:33 +0800 > ^^ > > Not sure where this data comes from... :) > > "Yan Xin Kuan" wrote: > > > From: Yan > > > > enable the ptest function for cpio. > > > > cpio takes 1 second maybe less, so it is fast. > > > > you will get ptest result like this: > > > > PASS: symlink > > SKIP: symlink-bad-length > > .. > > > > Signed-off-by: Yan > > Autobuilder testing with this patch generated lots of warnings: > > WARNING: cpio-2.13-r0 do_package_qa: QA Issue: File > /usr/lib/cpio/ptest/tests/atconfig in package cpio-ptest contains > reference to TMPDIR > > Here are a few logs: > > https://autobuilder.yoctoproject.org/typhoon/#/builders/96/builds/4375 > /steps/12/logs/stdio > https://autobuilder.yoctoproject.org/typhoon/#/builders/65/builds/6685 > /steps/12/logs/stdio > https://autobuilder.yoctoproject.org/typhoon/#/builders/104/builds/552 > 6/steps/12/logs/stdio > > More at: > > https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/4894 There are also reproducibility errors: https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/2361/steps/13/logs/stdio See the corresponding diffoscope results: http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20230207-yei_47xv/packages/diff-html/ -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#176834): https://lists.openembedded.org/g/openembedded-core/message/176834 Mute This Topic: https://lists.openembedded.org/mt/96819717/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [meta-oe][PATCH V1] cpio: add ptest
From: Yan enable the ptest function for cpio. cpio takes 1 second maybe less, so it is fast. you will get ptest result like this: PASS: symlink SKIP: symlink-bad-length .. Signed-off-by: Yan --- .../distro/include/ptest-packagelists.inc | 1 + .../recipes-extended/cpio/cpio-2.13/run-ptest | 10 ++ meta/recipes-extended/cpio/cpio_2.13.bb | 19 ++- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/cpio/cpio-2.13/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index d3e18ea4a4..3ca08d2b01 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -12,6 +12,7 @@ PTESTS_FAST = "\ bc-ptest \ bluez5-ptest \ busybox-ptest \ +cpio-ptest \ diffstat-ptest \ diffutils-ptest \ ethtool-ptest \ diff --git a/meta/recipes-extended/cpio/cpio-2.13/run-ptest b/meta/recipes-extended/cpio/cpio-2.13/run-ptest new file mode 100644 index 00..bdac7259c1 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.13/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +# Define cpio test work dir +WORKDIR=/usr/lib/cpio/ptest/tests/ + +# Run test +cd ${WORKDIR} +./atconfig ./atlocal ./testsuite + +./testsuite 2>&1 | grep -E '[0-9]{1,3}: ' | sed -e 's/^.//' -e '/[ok]$/s/^/PASS: /;/FAILED (.*)/s/^/FAIL: /;/skipped (.*)/s/^/SKIP: /;/expected failure/ s/^/PASS: /;/UNEXPECTED PASS/s/^/FAIL: /' -e 's/ok$//g' -e 's/FAILED.*//g' -e 's/skipped.*//g' -e 's/expected failure.*//g' -e 's/UNEXPECTED PASS.*//g' diff --git a/meta/recipes-extended/cpio/cpio_2.13.bb b/meta/recipes-extended/cpio/cpio_2.13.bb index eb3dc138a9..1a16b066f5 100644 --- a/meta/recipes-extended/cpio/cpio_2.13.bb +++ b/meta/recipes-extended/cpio/cpio_2.13.bb @@ -12,12 +12,13 @@ SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \ file://0001-obstack-Fix-a-clang-warning.patch \ file://CVE-2021-38185.patch \ file://0001-Use-__alignof__-with-clang.patch \ + file://run-ptest \ " SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810" SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88" -inherit autotools gettext texinfo +inherit autotools gettext texinfo ptest # Issue applies to use of cpio in SUSE/OBS, doesn't apply to us CVE_CHECK_IGNORE += "CVE-2010-4226" @@ -38,6 +39,22 @@ do_install () { mv "${D}${mandir}/man8/rmt.8" "${D}${mandir}/man8/rmt-cpio.8" } +do_compile_ptest() { +oe_runmake -C ${B}/gnu/ check +oe_runmake -C ${B}/lib/ check +oe_runmake -C ${B}/rmt/ check +oe_runmake -C ${B}/src/ check +oe_runmake -C ${B}/tests/ genfile +} + +do_install_ptest() { +install -d ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/atconfig ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/atlocal ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/genfile ${D}${PTEST_PATH}/tests/ +install --mode=755 ${S}/tests/testsuite ${D}${PTEST_PATH}/tests/ +} + PACKAGES =+ "${PN}-rmt" FILES:${PN}-rmt = "${sbindir}/rmt*" -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#176803): https://lists.openembedded.org/g/openembedded-core/message/176803 Mute This Topic: https://lists.openembedded.org/mt/96802432/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
回复: [OE-core] [meta-oe][PATCH V1] tar: add ptest
Hi, We place it in slow list for tar test takes at least 5 minutes. KVM is enabled, our PC uses Core i5 4th. Best, Yan -邮件原件- 发件人: Alexander Kanavin 发送时间: 2023年2月3日 19:11 收件人: Yan, Xinkuan/晏 新宽 抄送: openembedded-core@lists.openembedded.org; FNST fnstml-fujitsuten 主题: Re: [OE-core] [meta-oe][PATCH V1] tar: add ptest On Fri, 3 Feb 2023 at 04:08, Yan Xin Kuan wrote: > @@ -100,6 +100,7 @@ PTESTS_SLOW = "\ > python3-cryptography-ptest \ > python3-ptest \ > strace-ptest \ > +tar-ptest \ > tcl-ptest \ > util-linux-ptest \ > valgrind-ptest \ PTESTS_SLOW is for tests longer than 30 seconds. How long does the tar test take in your local testing? Is kvm in use? Alex -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#176787): https://lists.openembedded.org/g/openembedded-core/message/176787 Mute This Topic: https://lists.openembedded.org/mt/96775604/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [meta-oe][PATCH V1] tar: add ptest
From: Yan enable ptest for oss "tar". Signed-off-by: Yanxinkuan --- .../distro/include/ptest-packagelists.inc | 1 + meta/recipes-extended/tar/files/run-ptest | 10 +++ meta/recipes-extended/tar/tar_1.34.bb | 27 +-- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/tar/files/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 72162f10ee..d3e18ea4a4 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -100,6 +100,7 @@ PTESTS_SLOW = "\ python3-cryptography-ptest \ python3-ptest \ strace-ptest \ +tar-ptest \ tcl-ptest \ util-linux-ptest \ valgrind-ptest \ diff --git a/meta/recipes-extended/tar/files/run-ptest b/meta/recipes-extended/tar/files/run-ptest new file mode 100644 index 00..9ca27153d9 --- /dev/null +++ b/meta/recipes-extended/tar/files/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +# Define tar test work dir +WORKDIR=/usr/lib/tar/ptest/tests/ + +# Run test +cd ${WORKDIR} +./atconfig ./atlocal ./testsuite + +./testsuite 2>&1 | grep -E '[0-9]{1,3}: ' | sed -e 's/^.//' -e '/[ok]$/s/^/PASS: /;/FAILED (.*)/s/^/FAIL: /;/skipped (.*)/s/^/SKIP: /;/expected failure/ s/^/PASS: /;/UNEXPECTED PASS/s/^/FAIL: /' -e 's/ok$//g' -e 's/FAILED.*//g' -e 's/skipped.*//g' -e 's/expected failure.*//g' -e 's/UNEXPECTED PASS.*//g' diff --git a/meta/recipes-extended/tar/tar_1.34.bb b/meta/recipes-extended/tar/tar_1.34.bb index 7307cd57a2..7a178c345f 100644 --- a/meta/recipes-extended/tar/tar_1.34.bb +++ b/meta/recipes-extended/tar/tar_1.34.bb @@ -6,11 +6,12 @@ SECTION = "base" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" +SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \ + file://run-ptest" SRC_URI[sha256sum] = "b44cc67f8a1f6b0250b7c860e952b37e8ed932a90bd9b1862a511079255646ff" -inherit autotools gettext texinfo +inherit autotools gettext texinfo ptest PACKAGECONFIG ??= "" PACKAGECONFIG:append:class-target = " ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}" @@ -42,6 +43,28 @@ do_install:append:class-target() { fi } +# Tar testsuite would generate some small tests that are +# bash scripts, so set ptest dependency to bash +RDEPENDS:${PN}-ptest += "bash" + +do_compile_ptest() { +oe_runmake -C ${B}/gnu/ check +oe_runmake -C ${B}/lib/ check +oe_runmake -C ${B}/rmt/ check +oe_runmake -C ${B}/src/ check +oe_runmake -C ${B}/tests/ genfile checkseekhole ckmtime +} + +do_install_ptest() { +install -d ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/atconfig ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/atlocal ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/genfile ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/checkseekhole ${D}${PTEST_PATH}/tests/ +install --mode=755 ${B}/tests/ckmtime ${D}${PTEST_PATH}/tests/ +install --mode=755 ${S}/tests/testsuite ${D}${PTEST_PATH}/tests/ +} + PACKAGES =+ "${PN}-rmt" FILES:${PN}-rmt = "${sbindir}/rmt*" -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#176705): https://lists.openembedded.org/g/openembedded-core/message/176705 Mute This Topic: https://lists.openembedded.org/mt/96716263/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [meta-oe][PATCH] bc ptest: fix bugs caused by input method
From: Yan Xinkuan fix some bugs related to echo function caused by input method. echo would work fine now, difference as below: before: “PASS: bc/*.b” now:PASS: bc/*.b Signed-off-by: Yan Xinkuan --- meta/recipes-extended/bc/bc/run-ptest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-extended/bc/bc/run-ptest b/meta/recipes-extended/bc/bc/run-ptest index 66a1b9d708..ba5abe6805 100644 --- a/meta/recipes-extended/bc/bc/run-ptest +++ b/meta/recipes-extended/bc/bc/run-ptest @@ -2,8 +2,8 @@ for TEST in *.b; do if bc -l $TEST -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#176704): https://lists.openembedded.org/g/openembedded-core/message/176704 Mute This Topic: https://lists.openembedded.org/mt/96716154/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [meta-oe][PATCH] bc ptest: fix bugs caused by input method
From: Yan Xinkuan fix some bugs related to echo function caused by input method. echo would work fine now, difference as below: before: “PASS: bc/*.b” now:PASS: bc/*.b Signed-off-by: Yan Xinkuan --- meta/recipes-extended/bc/bc/run-ptest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-extended/bc/bc/run-ptest b/meta/recipes-extended/bc/bc/run-ptest index 66a1b9d708..ba5abe6805 100644 --- a/meta/recipes-extended/bc/bc/run-ptest +++ b/meta/recipes-extended/bc/bc/run-ptest @@ -2,8 +2,8 @@ for TEST in *.b; do if bc -l $TEST -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#173124): https://lists.openembedded.org/g/openembedded-core/message/173124 Mute This Topic: https://lists.openembedded.org/mt/94955322/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[meta-oe][oe-core][PATCH V5] bc: Add ptest.
From: Yan Xinkuan Add ptest for OSS 'bc' by using 'bc' in the system to do calculation jobs according to the .b files from the source file. Test example as below: .. .00673400673400673400 “PASS: bc/div.b” 99836408603283573660347145562829683495827909199408566065153345558783\ 9427595471.89114392327665123852 “PASS: bc/exp.b” length(b)= 1406 “PASS: bc/fact.b” .. If bc runs the .b files and does not crash, it would 'PASS', otherwise 'FAIL'. Tested in qemux86-64, with kvm enabled, test cost 12 secs, so it should be a fast test. Thanks to Ross Burton and Alexander Kanavin for the professional guidance. Signed-off-by: Yan Xinkuan --- meta/conf/distro/include/ptest-packagelists.inc | 1 + meta/recipes-extended/bc/bc/run-ptest | 9 + meta/recipes-extended/bc/bc_1.07.1.bb | 9 +++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/bc/bc/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 56088e4e66..32b0e5297a 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -8,6 +8,7 @@ PTESTS_FAST = "\ apr-ptest \ apr-util-ptest \ attr-ptest \ +bc-ptest \ bluez5-ptest \ bzip2-ptest \ diffstat-ptest \ diff --git a/meta/recipes-extended/bc/bc/run-ptest b/meta/recipes-extended/bc/bc/run-ptest new file mode 100644 index 00..66a1b9d708 --- /dev/null +++ b/meta/recipes-extended/bc/bc/run-ptest @@ -0,0 +1,9 @@ +#! /bin/sh + +for TEST in *.b; do + if bc -l $TEST -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#172348): https://lists.openembedded.org/g/openembedded-core/message/172348 Mute This Topic: https://lists.openembedded.org/mt/94699073/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [meta-oe][oe-core][PATCH V4] bc: Add ptest.
Got it. Can be seen in v5. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#172347): https://lists.openembedded.org/g/openembedded-core/message/172347 Mute This Topic: https://lists.openembedded.org/mt/94681755/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[meta-oe][oe-core][PATCH V4] bc: Add ptest.
From: Yan Xinkuan Add package test function for OSS 'bc', using bc in the system to do calculation jobs according to the .b files from the source code file of 'bc'. Test example as below: .. .00673400673400673400 “PASS: bc/div.b” 9983640860328357366034714556282968349582 7909199408566065153345558783\ 9427595471.89114392327665123852 “PASS: bc/exp.b” length(b)= 1406 “PASS: bc/fact.b” .. If bc runs the .b files and does not crash, it would 'PASS', otherwise it would 'FAIL'. Tested in qemux86-64, with kvm enabled, test cost 12 secs, so it should be a fast test. Thanks to Ross Burton and Alexander Kanavin for the professional guidance. Signed-off-by: Yan Xinkuan --- meta/conf/distro/include/ptest-packagelists.inc | 1 + meta/recipes-extended/bc/bc/run-ptest | 9 + meta/recipes-extended/bc/bc_1.07.1.bb | 9 +++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/bc/bc/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 56088e4e66..0a52a48ef1 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -69,6 +69,7 @@ PTESTS_FAST = "\ slang-ptest \ wayland-ptest \ zlib-ptest \ +bc-ptest \ " PTESTS_FAST:append:libc-glibc = " glibc-tests-ptest" PTESTS_PROBLEMS:remove:libc-glibc = "glibc-tests-ptest" diff --git a/meta/recipes-extended/bc/bc/run-ptest b/meta/recipes-extended/bc/bc/run-ptest new file mode 100644 index 00..da2156f8cd --- /dev/null +++ b/meta/recipes-extended/bc/bc/run-ptest @@ -0,0 +1,9 @@ +#! /bin/sh + +for TEST in *.b; do + if bc -l $TEST -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#172300): https://lists.openembedded.org/g/openembedded-core/message/172300 Mute This Topic: https://lists.openembedded.org/mt/94681755/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Public: Re: [meta-oe][oe-core][PATCH V3] bc: Add ptest.
Sure. I did not intend to make it private. I just do not know how, it takes time for new commers to get used to this mailling list kind of management. I will find myself some docs to look into. Maybe this is not working, for I can not see our conversation on the website: "Public: Re: [meta-oe][PATCH V3] bc: Add ptest." I switched it to this: Public: Re: [meta-oe][oe-core][PATCH V3] bc: Add ptest. Not pretty sure weather it works or not. Nevermind, I would find some guidence in oe docs. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#172298): https://lists.openembedded.org/g/openembedded-core/message/172298 Mute This Topic: https://lists.openembedded.org/mt/94681666/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [meta-oe][PATCH V3] bc: Add ptest.
From: Yan Xinkuan Add package test function for OSS 'bc', using bc in the system to do calculation jobs according to the .b files from the source code file of 'bc'. Test example as below: .. .00673400673400673400 “PASS: bc/div.b” 99836408603283573660347145562829683495827909199408566065153345558783\ 9427595471.89114392327665123852 “PASS: bc/exp.b” length(b)= 1406 “PASS: bc/fact.b” .. If bc runs the .b files and does not crash, it would 'PASS', otherwise it would 'FAIL'. I ran ptest with Intel CORE i5 4450, in qemux86-64, the whole test took up to 124 seconds, so it should be a slow test. Thanks to Ross Burton for the professional guidance. Signed-off-by: Yan Xinkuan --- meta/conf/distro/include/ptest-packagelists.inc | 1 + meta/recipes-extended/bc/bc/run-ptest | 9 + meta/recipes-extended/bc/bc_1.07.1.bb | 9 +++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/bc/bc/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 56088e4e66..5cbed54cc5 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -100,6 +100,7 @@ PTESTS_SLOW = "\ tcl-ptest \ util-linux-ptest \ valgrind-ptest \ +bc-ptest \ " PTESTS_SLOW:remove:riscv64 = "valgrind-ptest" diff --git a/meta/recipes-extended/bc/bc/run-ptest b/meta/recipes-extended/bc/bc/run-ptest new file mode 100644 index 00..da2156f8cd --- /dev/null +++ b/meta/recipes-extended/bc/bc/run-ptest @@ -0,0 +1,9 @@ +#! /bin/sh + +for TEST in *.b; do + if bc -l $TEST -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#172291): https://lists.openembedded.org/g/openembedded-core/message/172291 Mute This Topic: https://lists.openembedded.org/mt/94680520/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [meta-oe][PATCH V2] bc: add ptest
From: Yan Xinkuan add ptest for bc, modified the original 'timetest' script, only using bc in the system to run package test. Signed-off-by: Yan Xinkuan --- .../distro/include/ptest-packagelists.inc | 1 + ...0001-ptest-only-use-bc-in-the-system.patch | 34 +++ meta/recipes-extended/bc/bc/run-ptest | 8 + meta/recipes-extended/bc/bc_1.07.1.bb | 23 +++-- 4 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/bc/bc/0001-ptest-only-use-bc-in-the-system.patch create mode 100644 meta/recipes-extended/bc/bc/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 56088e4e66..5cbed54cc5 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -100,6 +100,7 @@ PTESTS_SLOW = "\ tcl-ptest \ util-linux-ptest \ valgrind-ptest \ +bc-ptest \ " PTESTS_SLOW:remove:riscv64 = "valgrind-ptest" diff --git a/meta/recipes-extended/bc/bc/0001-ptest-only-use-bc-in-the-system.patch b/meta/recipes-extended/bc/bc/0001-ptest-only-use-bc-in-the-system.patch new file mode 100644 index 00..191db358e3 --- /dev/null +++ b/meta/recipes-extended/bc/bc/0001-ptest-only-use-bc-in-the-system.patch @@ -0,0 +1,34 @@ +From a7a19baf07cde3eaf8f0c007fea47f2c45475874 Mon Sep 17 00:00:00 2001 +From: Yan Xinkuan +Date: Mon, 24 Oct 2022 16:08:37 +0800 +Subject: [PATCH] ptest: only use bc in the system + +use bc in the system to do ptest. + +Upstream-Status: Pending + +Signed-off-by: Yan Xinkuan +--- + timetest | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/Test/timetest b/Test/timetest +index 36d8d8e..313250a 100755 +--- a/Test/timetest b/Test/timetest +@@ -3,12 +3,9 @@ + # Time the functions. + # + SYSBC=/usr/bin/bc +-if [ x$BC = x ] ; then +- BC=../bc/bc +-fi + for file in exp.b ln.b sine.b atan.b jn.b mul.b div.b raise.b sqrt.b fact.b + do + for prog in $SYSBC $BC $OTHERBC + do + echo Timing $file with $prog + time $prog -l $file +-- +2.25.1 + diff --git a/meta/recipes-extended/bc/bc/run-ptest b/meta/recipes-extended/bc/bc/run-ptest new file mode 100644 index 00..7e37e9ef01 --- /dev/null +++ b/meta/recipes-extended/bc/bc/run-ptest @@ -0,0 +1,8 @@ +#!/bin/bash +cd ./bc_test +if ./timetest; then + echo "PASS: bc/timetest" +else + echo "FAIL: bc/timetest" +fi + diff --git a/meta/recipes-extended/bc/bc_1.07.1.bb b/meta/recipes-extended/bc/bc_1.07.1.bb index 1bec76bb2a..d931690d7d 100644 --- a/meta/recipes-extended/bc/bc_1.07.1.bb +++ b/meta/recipes-extended/bc/bc_1.07.1.bb @@ -15,11 +15,13 @@ DEPENDS = "flex-native" SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ file://no-gen-libmath.patch \ file://libmath.h \ - file://0001-dc-fix-exit-code-of-q-command.patch" + file://0001-dc-fix-exit-code-of-q-command.patch \ + file://0001-ptest-only-use-bc-in-the-system.patch \ + file://run-ptest" SRC_URI[md5sum] = "cda93857418655ea43590736fc3ca9fc" SRC_URI[sha256sum] = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a" -inherit autotools texinfo update-alternatives +inherit autotools texinfo update-alternatives ptest PACKAGECONFIG ??= "readline" PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" @@ -29,6 +31,23 @@ do_compile:prepend() { cp -f ${WORKDIR}/libmath.h ${B}/bc/libmath.h } +RDEPENDS:${PN}-ptest += "bash" + +do_install_ptest() { +install -d ${D}${PTEST_PATH}/bc_test/ +install ${S}/Test/atan.b ${D}${PTEST_PATH}/bc_test/ +install ${S}/Test/div.b ${D}${PTEST_PATH}/bc_test/ +install ${S}/Test/exp.b ${D}${PTEST_PATH}/bc_test/ +install ${S}/Test/fact.b ${D}${PTEST_PATH}/bc_test/ +install ${S}/Test/jn.b ${D}${PTEST_PATH}/bc_test/ +install ${S}/Test/ln.b ${D}${PTEST_PATH}/bc_test/ +install ${S}/Test/mul.b ${D}${PTEST_PATH}/bc_test/ +install ${S}/Test/raise.b ${D}${PTEST_PATH}/bc_test/ +install ${S}/Test/sine.b ${D}${PTEST_PATH}/bc_test/ +install ${S}/Test/sqrt.b ${D}${PTEST_PATH}/bc_test/ +install ${S}/Test/timetest ${D}${PTEST_PATH}/bc_test/ +} + ALTERNATIVE:${PN} = "bc dc" ALTERNATIVE_PRIORITY = "100" -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#172121): https://lists.openembedded.org/g/openembedded-core/message/172121 Mute This Topic: https://lists.openembedded.org/mt/94554197/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-