]> scripts.mit.edu Git - wizard.git/blob - tests/all.sh
Fix non-zero shell exit code and --continue in wrong directory.
[wizard.git] / tests / all.sh
1 #!/bin/bash
2 cd `dirname $0`
3 bold="`tput -T${TERM:-dumb} bold`"
4 red="`tput -T${TERM:-dumb} setf 4`"
5 sgr0="`tput -T${TERM:-dumb} sgr0`"
6 APP="$1"
7 if [ "$APP" == "" ]; then
8     echo "Must specify application"
9     exit 1
10 fi
11 for i in $1-*-test.sh; do
12     ./$i "$2"
13     if [ $? -eq 0 ]
14     then
15         echo "${bold}OK${sgr0}"
16     else
17         echo "${bold}${red}FAIL${sgr0}"
18     fi
19     echo
20 done