xrforge/manyfold/test/runtests.sh

16 lines
483 B
Bash
Executable file

#!/bin/sh
echo ""
echo "running tests in /test/*"
echo ""
error(){ echocolor "❌" "$*"; exit 1; }
ok(){ echocolor "✅" "$*"; return 0; }
echocolor(){ printf "\033[96m%s\033[0m \033[95m%s\033[0m %s\n" "$1" "$2" "$3"; }
find -L /test/* -type f -executable -maxdepth 1 | grep -v runtests | sort -V | while read testscript; do
echo "🛠 $testscript"
{
$testscript "$@" 2>&1 && ok "$testscript" || error "$testscript"
} | awk '{ print " | "$0 }'
done