diff options
author | yanxk <yanxk.fnst@fujitsu.com> | 2023-02-09 08:54:56 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-10 09:25:44 +0000 |
commit | 456a61c0f82bffccdc415405214bf5227d5f6b43 (patch) | |
tree | df7f9e8472805a5e58826167d900002e7e7d6ef0 /meta/recipes-extended/cpio/cpio_2.13.bb | |
parent | 8a1e91934e1adca6be15947b0074928beff5a15e (diff) | |
download | poky-456a61c0f82bffccdc415405214bf5227d5f6b43.tar.gz |
cpio: Add ptest support
Add ptest function for oss 'cpio'.
Tis 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.
(From OE-Core rev: 9661e76aa1ea89b3dcc24a4d69fa7e6161873d7f)
Signed-off-by: yanxk <yanxk.fnst@fujitsu.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/cpio/cpio_2.13.bb')
-rw-r--r-- | meta/recipes-extended/cpio/cpio_2.13.bb | 22 |
1 files changed, 21 insertions, 1 deletions
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 | ||
17 | SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810" | 18 | SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810" |
18 | SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88" | 19 | SRC_URI[sha256sum] = "e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88" |
19 | 20 | ||
20 | inherit autotools gettext texinfo | 21 | inherit 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 |
23 | CVE_CHECK_IGNORE += "CVE-2010-4226" | 24 | CVE_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 | ||
42 | do_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 | |||
50 | do_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 | |||
41 | PACKAGES =+ "${PN}-rmt" | 61 | PACKAGES =+ "${PN}-rmt" |
42 | 62 | ||
43 | FILES:${PN}-rmt = "${sbindir}/rmt*" | 63 | FILES:${PN}-rmt = "${sbindir}/rmt*" |