37e63909c0
which included commits to RCS files with non-trunk default branches.
39 lines
664 B
Bash
Executable File
39 lines
664 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ $# -lt 3 ]
|
|
then
|
|
echo >&2 'usage: m1test <name> <initfile> [<initflags>] <queryargs>'
|
|
exit 1
|
|
fi
|
|
|
|
case="case-$1"; shift
|
|
initfile="$1"; shift
|
|
|
|
case "$1" in
|
|
-*) initflags="$1"; shift
|
|
esac
|
|
|
|
queryargs="$*"
|
|
|
|
initstring="`cat init-$initfile.text`"
|
|
|
|
echo $initfile $initflags >"$case.sys"
|
|
echo "$queryargs" >>"$case.sys"
|
|
|
|
EF_DISABLE_BANNER=1
|
|
export EF_DISABLE_BANNER
|
|
|
|
echo running hrecord $initflags "/... $queryargs"
|
|
set +e
|
|
ADNS_TEST_OUT_FD=3 3>>"$case.sys" >"$case.out" 2>"$case.err" </dev/null \
|
|
./hrecord $initflags "/$initstring" $queryargs
|
|
rc=$?
|
|
set -e
|
|
|
|
echo "rc=$rc" >>$case.out
|
|
|
|
egrep . -- "$case.err" "$case.out"
|
|
echo "exit status: $rc"
|