ocase="output-$casename"
exec <"$case.sys"
-read initfile
+read initfile initflags
read queryargs
initstring="`cat init-$initfile.text`"
set +e
ADNS_TEST_REPORT_FD=3 3>>"$ocase.report" >"$ocase.out" 2>"$ocase.err" \
- ./hplayback "/$initstring" $queryargs
+ ./hplayback $initflags "/$initstring" $queryargs
rc=$?
set -e
-if test $rc != 0
-then
- egrep . -- "$ocase.report" "$ocase.out" "$ocase.err"
- echo >&2 "FAILED $case - EXIT STATUS $rc"
- exit 2
-fi
+echo "rc=$rc" >>$ocase.out
-for part in out err
+failed=false
+for part in err out
do
- if diff -- "$case.$part" "$ocase.$part"
+ if diff -u -- "$case.$part" "$ocase.$part"
then
:
else
- echo >&2 "FAILED $case - WRONG OUTPUT"
- exit 2
+ failed=true
fi
done
+if $failed
+then
+ echo >&2 "FAILED $case - WRONG OUTPUT - lines of syscall remaining `wc -l`"
+ exit 2
+fi
+
echo -n "$casename "
exit 0