urchin/urchin
2012-10-08 10:18:48 -04:00

35 lines
598 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
}
echo Running tests
recurse .
echo
echo Done