urchin/urchin

36 lines
607 B
Plaintext
Raw Normal View History

2012-10-04 07:24:03 -04:00
#!/bin/sh
2012-10-04 07:29:34 -04:00
recurse() {
potential_test="$1"
if [ -d "$potential_test" ]
then
(
cd "$potential_test"
2012-10-08 10:16:49 -04:00
[ -f setup ] && [ -x setup ] && ./setup
for test in *
2012-10-08 08:50:48 -04:00
do recurse "${test}"
done
2012-10-08 10:16:49 -04:00
[ -f teardown ] && [ -x teardown ] && ./teardown
2012-10-04 07:29:34 -04:00
)
2012-10-08 08:59:14 -04:00
elif [ -x "$potential_test" ]
2012-10-04 07:29:34 -04:00
then
2012-10-08 08:59:14 -04:00
./"$potential_test"
if [ "$?" = '0' ]
2012-10-04 07:29:34 -04:00
then
2012-10-04 07:32:33 -04:00
# Print a '.'
echo -n .
2012-10-04 07:29:34 -04:00
else
2012-10-04 07:32:33 -04:00
# Print a red 'F'
echo -ne '\033[31mF'
echo -ne "\033[0m"
2012-10-08 09:26:44 -04:00
echo -n "(${potential_test})"
2012-10-04 07:29:34 -04:00
fi
fi
}
2012-10-04 12:43:49 -04:00
2012-10-08 10:16:49 -04:00
then
echo Running tests
recurse tests
echo
echo Done