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"
|
|
|
|
[ -f setup ] && sh setup
|
|
|
|
ls test* | xargs recurse
|
|
|
|
[ -f teardown ] && sh teardown
|
|
|
|
)
|
|
|
|
elif [ -f "$potential_test" ]
|
|
|
|
then
|
|
|
|
sh "$potential_test"
|
|
|
|
if [ "$@" = '0' ]
|
|
|
|
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-04 11:29:34 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
2012-10-04 16:43:49 +00:00
|
|
|
|
|
|
|
if [ -d tests ]
|
|
|
|
then
|
|
|
|
recurse tests
|
|
|
|
else
|
|
|
|
echo 'No tests directory' && exit 1
|
|
|
|
fi
|