On Fri, Nov 04, 2022 at 10:01:40AM +0000, Chase Qi wrote: > 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. > > Signed-off-by: Chase Qi <[email protected]> > --- > .../distro/include/ptest-packagelists.inc | 1 + > meta/recipes-core/musl/libc-test/run-ptest | 17 +++++++ > meta/recipes-core/musl/libc-test_git.bb | 50 +++++++++++++++++++ > 3 files changed, 68 insertions(+) > create mode 100644 meta/recipes-core/musl/libc-test/run-ptest > create mode 100644 meta/recipes-core/musl/libc-test_git.bb > > diff --git a/meta/conf/distro/include/ptest-packagelists.inc > b/meta/conf/distro/include/ptest-packagelists.inc > index 32b0e5297a..3c9ff43bd9 100644 > --- a/meta/conf/distro/include/ptest-packagelists.inc > +++ b/meta/conf/distro/include/ptest-packagelists.inc > @@ -105,6 +105,7 @@ PTESTS_SLOW = "\ > > PTESTS_SLOW:remove:riscv64 = "valgrind-ptest" > PTESTS_PROBLEMS:append:riscv64 = "valgrind-ptest" > +PTESTS_SLOW:append:libc-musl = " libc-test-ptest" > > # ruby-ptest \ # Timeout > # lz4-ptest \ # Needs a rewrite > 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..a30cee590e > --- /dev/null > +++ b/meta/recipes-core/musl/libc-test/run-ptest > @@ -0,0 +1,17 @@ > +#!/bin/sh > +
Please use at least "set -e" to capture errors of failing commands. > +cd /opt/libc-test > +make cleanall > +make run | tee libc-test.log Depending how this handles errors, the return value from "make run" may need to be discarded, but I'd prefer this to be explicit if "set -e" is used. > +echo "" > +echo "--- ptest result ---" > +if grep -q '^FAIL src.*\.exe.*' libc-test.log; then > + # Consolidate output format. > + # e.g. "FAIL src/api/main.exe [status 1]" -> "FAIL: api_main" > + grep '^FAIL src.*\.exe.*' libc-test.log \ > + | sed 's|^FAIL src/|FAIL: |;s|/|_|;s|\.exe.*\]||' > + exit 1 > +else > + echo "PASS: libc-test" Would be nice if something would check that tests were actually executed. Cheers, -Mikko
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#172707): https://lists.openembedded.org/g/openembedded-core/message/172707 Mute This Topic: https://lists.openembedded.org/mt/94802446/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
