]>
Commit | Line | Data |
---|---|---|
8d876415 DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
adee3bae | 4 | FAIL=0 |
9962ae93 | 5 | DIR=$(readlink -f $(dirname $0)) |
39cc8228 DK |
6 | if [ "$1" = "-q" ]; then |
7 | export MSGLEVEL=2 | |
8 | elif [ "$1" = "-v" ]; then | |
18331adf | 9 | export MSGLEVEL=4 |
39cc8228 | 10 | fi |
8d876415 | 11 | for testcase in $(run-parts --list $DIR | grep '/test-'); do |
39cc8228 DK |
12 | if [ "$1" = "-q" ]; then |
13 | echo -n "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m" | |
14 | else | |
15 | echo "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m" | |
16 | fi | |
adee3bae MV |
17 | if ! ${testcase}; then |
18 | FAIL=$((FAIL+1)) | |
19 | echo "$(basename $testcase) ... FAIL" | |
20 | fi | |
39cc8228 DK |
21 | if [ "$1" = "-q" ]; then |
22 | echo | |
23 | fi | |
8d876415 | 24 | done |
adee3bae MV |
25 | |
26 | echo "failures: $FAIL" | |
27 | exit $FAIL |