diff options
author | Ross Burton <ross.burton@arm.com> | 2025-06-06 16:15:44 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-09 17:43:41 +0100 |
commit | e493ed85a374af77d922eb915c5b8d9bb7b78e71 (patch) | |
tree | 3b8036f34c6d618da17fcd1ded4e7597e9cc9e6c | |
parent | f8d0b0127a5ded6be6ff8ddf5ecf75091137ffa0 (diff) | |
download | poky-e493ed85a374af77d922eb915c5b8d9bb7b78e71.tar.gz |
cpio: improve ptests
We don't need to run 'make check' across the source tree.
Forcibly regenerate tests/testsuite so it supports the --am-fmt option
that we patch into autoconf.
Add coreutils to ptest RDEPENDS as the symlink-bad-length test needs
base64.
Clean up run-ptest: there's no need to run atconfig manually, and use
--am-fmt instead of manually sedding the output.
(From OE-Core rev: 6829e353dd5a68c8d6b3ed07ae14bfe817e2156a)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-extended/cpio/cpio_2.15.bb | 10 | ||||
-rw-r--r-- | meta/recipes-extended/cpio/files/test.sh | 9 |
2 files changed, 7 insertions, 12 deletions
diff --git a/meta/recipes-extended/cpio/cpio_2.15.bb b/meta/recipes-extended/cpio/cpio_2.15.bb index 77fb019af9..fa011251e2 100644 --- a/meta/recipes-extended/cpio/cpio_2.15.bb +++ b/meta/recipes-extended/cpio/cpio_2.15.bb | |||
@@ -37,10 +37,10 @@ do_install () { | |||
37 | } | 37 | } |
38 | 38 | ||
39 | do_compile_ptest() { | 39 | do_compile_ptest() { |
40 | oe_runmake -C ${B}/gnu/ check | 40 | # Forcibly regenerate this script so we get our --am-fmt option |
41 | oe_runmake -C ${B}/lib/ check | 41 | rm -f ${S}/tests/testsuite |
42 | oe_runmake -C ${B}/rmt/ check | 42 | oe_runmake -C ${B}/tests/ testsuite |
43 | oe_runmake -C ${B}/src/ check | 43 | |
44 | oe_runmake -C ${B}/tests/ genfile | 44 | oe_runmake -C ${B}/tests/ genfile |
45 | } | 45 | } |
46 | 46 | ||
@@ -69,7 +69,7 @@ do_install_ptest_base:append() { | |||
69 | DEPENDS:append:class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', 'ptest-runner', '', d)}" | 69 | DEPENDS:append:class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', 'ptest-runner', '', d)}" |
70 | PACKAGE_WRITE_DEPS:append:class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', 'ptest-runner', '', d)}" | 70 | PACKAGE_WRITE_DEPS:append:class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', 'ptest-runner', '', d)}" |
71 | 71 | ||
72 | RDEPENDS:${PN}-ptest += "ptest-runner" | 72 | RDEPENDS:${PN}-ptest += "ptest-runner coreutils" |
73 | 73 | ||
74 | PACKAGES =+ "${PN}-rmt" | 74 | PACKAGES =+ "${PN}-rmt" |
75 | 75 | ||
diff --git a/meta/recipes-extended/cpio/files/test.sh b/meta/recipes-extended/cpio/files/test.sh index f027574e86..e966ed91f8 100644 --- a/meta/recipes-extended/cpio/files/test.sh +++ b/meta/recipes-extended/cpio/files/test.sh | |||
@@ -1,10 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | # Define cpio test work dir | 3 | cd @PTEST_PATH@/tests/ |
4 | WORKDIR=@PTEST_PATH@/tests/ | ||
5 | 4 | ||
6 | # Run test | 5 | ./testsuite --am-fmt |
7 | cd ${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' | ||