source: trunk/athena/bin/hostinfo/regress.sh @ 17682

Revision 17682, 774 bytes checked in by jweiss, 22 years ago (diff)
1) deal with hosts that have MX records, but not A records 2) deal with the 9.1 host which doesn't do an MX query by default 3) rototill the regression tests because they were completely broken, not that we ever run them
  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3SRCDIR=${SRCDIR:-.}
4
5check () {
6    if [ "$2" != "$3" ]; then
7        echo Regression test failed checking $1:
8        echo Expected $2, got $3
9        exit 1
10    fi;
11}
12
13gather () {
14    $1 | sort | tr '\012' ' ' | sed -e 's/ $//'
15}
16
17check "bitsy's host address" 18.72.0.3 "`$SRCDIR/hostinfo.pl -a bitsy 2>&1`"
18check "18.71.0.151's name" STRAWB.MIT.EDU. "`$SRCDIR/hostinfo.pl -h 18.71.0.151 2>&1`"
19check "ls's hostinfo" "\"DEC/VAXSTATION-3100\"/\"UNIX\"" "`$SRCDIR/hostinfo.pl -i ls 2>&1`"
20check "alum's MX record" alum.mit.edu. "`$SRCDIR/hostinfo.pl -m alum.mit.edu 2>&1`"
21
22athmx=`gather "$SRCDIR/hostinfo.pl -m athena"`
23outmx=`gather "$SRCDIR/hostinfo.pl -m outgoing"`
24check "athena's MX records match outgoing's MX records" "$athmx" "$outmx"
25
26echo "Regression tests passed."
27exit 0
Note: See TracBrowser for help on using the repository browser.