commit d30d96e507da043c9e8fcaa1acccd06e075d74d4
parent caefe72083c923425fbea1a990840cf4721263cb
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date: Wed, 22 Apr 2026 10:37:23 +0200
tests/libc: Add support for skipping tests
There are some cases where there are tests that don't apply to
any system, but they still have value checking some important
bits of the arch part of the libc, like for example the format
of the TZ environment variable in unix systems.
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/libc/execute/runtests.sh b/tests/libc/execute/runtests.sh
@@ -17,7 +17,11 @@ do
(echo $i
$CC $CFLAGS -o $i $i.c
echo '/^output:$/+;/^end:$/-'w $tmp1 | ed -s $i.c
- ./$i > $tmp2 2>&1
+ if ./$i 2>&1 | tee $tmp2 | grep '^RESULT: SKIP$'
+ then
+ printf '\tSKIP\t%s\n' $i $state
+ continue
+ fi
diff -u $tmp1 $tmp2) >> test.log 2>&1 &&
printf '[PASS]' || printf '[FAIL]'