urchin/urchin
Thomas Levine 82f17b7172 docs
2012-10-08 10:16:49 -04:00

36 lines
607 B
Bash
Executable File

#!/bin/sh
recurse() {
potential_test="$1"
if [ -d "$potential_test" ]
then
(
cd "$potential_test"
[ -f setup ] && [ -x setup ] && ./setup
for test in *
do recurse "${test}"
done
[ -f teardown ] && [ -x teardown ] && ./teardown
)
elif [ -x "$potential_test" ]
then
./"$potential_test"
if [ "$?" = '0' ]
then
# Print a '.'
echo -n .
else
# Print a red 'F'
echo -ne '\033[31mF'
echo -ne "\033[0m"
echo -n "(${potential_test})"
fi
fi
}
then
echo Running tests
recurse tests
echo
echo Done