tests: improve the output on macOS

This commit is contained in:
Pierre Pronchery 2024-06-05 19:35:32 +02:00
parent ca6fb7c13a
commit 8b5c712c96

View File

@ -29,8 +29,11 @@
#variables #variables
[ -n "$OBJDIR" ] || OBJDIR="./" [ -n "$OBJDIR" ] || OBJDIR="./"
PROGNAME="tests.sh" PROGNAME="tests.sh"
SYSTEM="$(uname -s)"
#executables #executables
DATE="date" DATE="date"
ECHO="echo"
[ "$SYSTEM" = "Darwin" ] && ECHO="/bin/echo"
#functions #functions
@ -47,7 +50,7 @@ _run()
test="$1" test="$1"
shift shift
echo -n "$test:" 1>&2 $ECHO -n "$test:" 1>&2
(echo (echo
echo "Testing: $test" "$@" echo "Testing: $test" "$@"
testexe="./$test" testexe="./$test"