Branch
Hash :
10a94889
Author :
Thomas de Grivel
Date :
2026-01-05T15:06:36
test_runner: show tests names
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
#!/bin/sh
## kc3
## Copyright from 2022 to 2025 kmx.io <contact@kmx.io>
##
## Permission is hereby granted to use this software granted the above
## copyright notice and this permission paragraph are included in all
## copies and substantial portions of this software.
##
## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
## THIS SOFTWARE.
. "$(dirname "$0")/test.subr"
TEST_RUNNER="$1"
TARGET="$2"
RESULT=test_ok
${TEST_RUNNER} --bool-ptr --load ${TARGET}.kc3 --quit > ${TARGET}.out 2>&1
echo $? > ${TARGET}.ret
if ! diff -abu ${TARGET}.out.expected ${TARGET}.out \
> ${TARGET}.diff
then
RESULT=test_ko
fi
if ! diff -abu ${TARGET}.ret.expected ${TARGET}.ret \
>> ${TARGET}.diff
then
RESULT=test_ko
fi
printf " %s" "${TARGET}"
if [ "x$RESULT" = "xtest_ok" ]; then
rm ${TARGET}.diff
test_ok ${TARGET}
else
test_ko ${TARGET}
fi