diff options
author | Chase Qi <chase.qi@linaro.org> | 2022-11-09 06:47:09 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-11-11 13:43:40 +0000 |
commit | 3a403ea562c7bc7aa07c40f5095c6078dc33366b (patch) | |
tree | 4f7b5f2344b1f188a1269b3c2022dcf3ff8af808 /meta/recipes-core/musl/libc-test | |
parent | f260b288020f07fdf0616d245691b2e40b6b6b4b (diff) | |
download | poky-3a403ea562c7bc7aa07c40f5095c6078dc33366b.tar.gz |
libc-test: add libc testsuite for musl
libc-test is a collection of unit test to measure the correctness and
robustness of a C/POSIX standard library implementation. It is developed
as part of the musl project.
(From OE-Core rev: 4a94cdc7e841ebe583b0e6935fc50d233c8c310e)
Signed-off-by: Chase Qi <chase.qi@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/musl/libc-test')
-rw-r--r-- | meta/recipes-core/musl/libc-test/run-ptest | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-core/musl/libc-test/run-ptest b/meta/recipes-core/musl/libc-test/run-ptest new file mode 100644 index 0000000000..0b4b687dec --- /dev/null +++ b/meta/recipes-core/musl/libc-test/run-ptest | |||
@@ -0,0 +1,28 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | |||
5 | cd /opt/libc-test | ||
6 | make cleanall | ||
7 | make run || true | ||
8 | |||
9 | echo "" | ||
10 | echo "--- ptest result ---" | ||
11 | # libc-test runs tests by module(e.g. src/api) and generates sub-module test | ||
12 | # report(e.g. src/api/REPORT) first. After all tests finish, it generates the | ||
13 | # consolidated report file src/REPORT. | ||
14 | report="/opt/libc-test/src/REPORT" | ||
15 | if ! [ -f "${report}" ]; then | ||
16 | echo "${report} not found!" | ||
17 | echo "FAIL: libc-test" | ||
18 | exit 1 | ||
19 | # libc-test prints error on failure and prints nothing on success. | ||
20 | elif grep -q '^FAIL src.*\.exe.*' "${report}"; then | ||
21 | # Print test failure in ptest format. | ||
22 | # e.g. "FAIL src/api/main.exe [status 1]" -> "FAIL: api_main" | ||
23 | grep '^FAIL src.*\.exe.*' "${report}" \ | ||
24 | | sed 's|^FAIL src/|FAIL: |;s|/|_|;s|\.exe.*\]||' | ||
25 | exit 1 | ||
26 | else | ||
27 | echo "PASS: libc-test" | ||
28 | fi | ||