chiark / gitweb /
Fix typo in changelog entry for 1.6.1
[adns.git] / regress / checkall
1 #!/bin/sh
2 # usage: checkall
3 # runs all test cases
4 #
5 #  This file is part of adns, which is Copyright Ian Jackson
6 #  and contributors (see the file INSTALL for full details).
7 #  
8 #  This program is free software; you can redistribute it and/or modify
9 #  it under the terms of the GNU General Public License as published by
10 #  the Free Software Foundation; either version 3, or (at your option)
11 #  any later version.
12 #  
13 #  This program is distributed in the hope that it will be useful,
14 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #  GNU General Public License for more details.
17 #  
18 #  You should have received a copy of the GNU General Public License
19 #  along with this program; if not, write to the Free Software Foundation.
20
21 set -e
22
23 : ${srcdir=.}
24 failed=''
25 passed=''
26 skipped=''
27
28 for f in $srcdir/case-*.sys
29 do
30         case="`echo \"$f\" | sed -e 's:^.*/::; s/^case-//; s/\.sys$//'`"
31         set +e
32         $srcdir/r1test $case
33         rc=$?
34         set -e
35         case $rc in
36         0)      passed="$passed $case" ;;
37         5)      skipped="$skipped $case" ;;
38         *)      echo
39                 failed="$failed $case"
40                 echo
41                 ;;
42         esac
43 done
44
45 if [ "x$failed" = x ]
46 then
47         echo "
48 "
49         if [ "x$skipped" = x ]
50         then
51                 echo "all tests passed."
52         else
53                 echo "all applicable tests passed (skipped:$skipped)"
54         fi
55         echo
56         exit 0
57 fi
58
59 echo >&2 "
60 AT LEAST ONE TEST FAILED
61 passed tests:${passed:- NONE}
62 skipped tests:${skipped:- NONE}
63 failed tests:$failed
64 "
65
66 exit 1