2 # usage: r1test <testcasename>
3 # test execution script, for running one test
5 # This file is part of adns, which is Copyright Ian Jackson
6 # and contributors (see the file INSTALL for full details).
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)
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.
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.
34 export EF_DISABLE_BANNER
36 if test ! -e $playback
38 printf "SKIPPED-$casename "
43 playback_execute_hook () { :; }
48 printf "SKIPPED-$casename "
53 echo "rc=$rc" >>$ocase.out
58 if diff -u -- "$case.$part" "$ocase.$part"
62 failwhy="$failwhy WRONG OUTPUT"
66 cat <&4 >"$ocase.leftover"
67 if egrep . /dev/null "$ocase.leftover"
69 failwhy="$failwhy EXITED EARLY"
72 if [ "x$failwhy" != x ]
74 scremain="`wc -l <\"$ocase.leftover\"`"
75 echo >&2 "FAILED $case -$failwhy - lines of syscall remaining $scremain"