chiark / gitweb /
+ * Copyright notices updated.
[adns.git] / regress / m1test
index 81cd024fe6b6bc7e6fd2af7d95615b66aaa7af91..c1500e7397026576885332adaa52a66c33f6ef9b 100755 (executable)
@@ -1,26 +1,57 @@
 #!/bin/sh
+# usage: m1test <name> <initfile> [<initflags>] <queryargs>'
+# test recording script
+#
+#  This file is
+#    Copyright (C) 1998-2000 Ian Jackson <ian@davenant.greenend.org.uk>
+#
+#  It is part of adns, which is
+#    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
+#    Copyright (C) 1999 Tony Finch <dot@dotat.at>
+#  
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2, or (at your option)
+#  any later version.
+#  
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#  
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
 
 set -e
 
 if [ $# -lt 3 ]
 then
-       echo >&2 'usage: m1test <name> <initfile> <queryargs>'
+       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" >"$case.sys"
+echo $initfile $initflags >"$case.sys"
 echo "$queryargs" >>"$case.sys"
 
-echo running "hrecord /... $queryargs"
+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 "/$initstring" $queryargs
+ ./hrecord $initflags "/$initstring" $queryargs
 rc=$?
 set -e