summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/conf/distro/include/ptest-packagelists.inc1
-rw-r--r--meta/recipes-extended/cpio/cpio-2.13/run-ptest10
-rw-r--r--meta/recipes-extended/cpio/cpio_2.13.bb22
3 files changed, 32 insertions, 1 deletions
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 = "\
12 bc-ptest \ 12 bc-ptest \
13 bluez5-ptest \ 13 bluez5-ptest \
14 busybox-ptest \ 14 busybox-ptest \
15 cpio-ptest \
15 diffstat-ptest \ 16 diffstat-ptest \
16 diffutils-ptest \ 17 diffutils-ptest \
17 ethtool-ptest \ 18 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 0000000000..bdac7259c1
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.13/run-ptest
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3# Define cpio test work dir
4WORKDIR=/usr/lib/cpio/ptest/tests/
5
6# Run test
7cd ${WORKDIR}
8./atconfig ./atlocal ./testsuite
9
10./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 \
12 file://0001-obstack-Fix-a-clang-warning.patch \ 12 file://0001-obstack-Fix-a-clang-warning.patch \
13 file://CVE-2021-38185.patch \ 13 file://CVE-2021-38185.patch \
14 file://0001-Use-__alignof__-with-clang.patch \ 14 file://0001-Use-__alignof__-with-clang.patch \
15 file://run-ptest \
15 " 16 "
16 17
17SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810" 18SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810"
18SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88" 19SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88"
19 20
20inherit autotools gettext texinfo 21inherit autotools gettext texinfo ptest
21 22
22# Issue applies to use of cpio in SUSE/OBS, doesn't apply to us 23# Issue applies to use of cpio in SUSE/OBS, doesn't apply to us
23CVE_CHECK_IGNORE += "CVE-2010-4226" 24CVE_CHECK_IGNORE += "CVE-2010-4226"
@@ -38,6 +39,25 @@ do_install () {
38 mv "${D}${mandir}/man8/rmt.8" "${D}${mandir}/man8/rmt-cpio.8" 39 mv "${D}${mandir}/man8/rmt.8" "${D}${mandir}/man8/rmt-cpio.8"
39} 40}
40 41
42do_compile_ptest() {
43 oe_runmake -C ${B}/gnu/ check
44 oe_runmake -C ${B}/lib/ check
45 oe_runmake -C ${B}/rmt/ check
46 oe_runmake -C ${B}/src/ check
47 oe_runmake -C ${B}/tests/ genfile
48}
49
50do_install_ptest() {
51 install -d ${D}${PTEST_PATH}/tests/
52 sed -i "/abs_/d" ${B}/tests/atconfig
53 install --mode=755 ${B}/tests/atconfig ${D}${PTEST_PATH}/tests/
54 sed -i "s%${B}/tests:%%g" ${B}/tests/atlocal
55 sed -i "s%${B}/src:%%g" ${B}/tests/atlocal
56 install --mode=755 ${B}/tests/atlocal ${D}${PTEST_PATH}/tests/
57 install --mode=755 ${B}/tests/genfile ${D}${PTEST_PATH}/tests/
58 install --mode=755 ${S}/tests/testsuite ${D}${PTEST_PATH}/tests/
59}
60
41PACKAGES =+ "${PN}-rmt" 61PACKAGES =+ "${PN}-rmt"
42 62
43FILES:${PN}-rmt = "${sbindir}/rmt*" 63FILES:${PN}-rmt = "${sbindir}/rmt*"