diff options
Diffstat (limited to 'meta/recipes-core/musl/libc-test/run-ptest')
-rw-r--r-- | meta/recipes-core/musl/libc-test/run-ptest | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/meta/recipes-core/musl/libc-test/run-ptest b/meta/recipes-core/musl/libc-test/run-ptest index 0b4b687dec..53cd34f506 100644 --- a/meta/recipes-core/musl/libc-test/run-ptest +++ b/meta/recipes-core/musl/libc-test/run-ptest | |||
@@ -1,28 +1,3 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | chown -R ptest:ptest /opt/libc-test | |
3 | set -e | 3 | su -c ./run-libc-ptests ptest |
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 | ||