urchin/urchin

35 lines
598 B
Plaintext
Raw Normal View History

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