X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/e9d74277f1c1262b5d8daf80b665e98c25b6dc37..9e50e3aca56796b6533223a3fe29a740ef3c776b:/regress/m1test?ds=sidebyside diff --git a/regress/m1test b/regress/m1test index e88933e..82e94ca 100755 --- a/regress/m1test +++ b/regress/m1test @@ -1,23 +1,35 @@ #!/bin/sh -# usage: m1test set -e + +if [ $# -lt 3 ] +then + echo >&2 'usage: m1test [] ' + 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" >"$case.sys" +echo $initfile $initflags >"$case.sys" echo "$queryargs" >>"$case.sys" -echo running "hrecord /... $queryargs" +echo running hrecord $initflags "/... $queryargs" set +e -ADNS_TEST_OUT_FD=3 3>>"$case.sys" >"$case.stdout" 2>"$case.stderr" >"$case.sys" >"$case.out" 2>"$case.err" >$case.out + +egrep . -- "$case.err" "$case.out" echo "exit status: $rc" -exit $rc