Revision 25957,
756 bytes
checked in by vasilvv, 11 years ago
(diff) |
Fix the regression test script
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | SRCDIR=${SRCDIR:-.} |
---|
4 | |
---|
5 | check () { |
---|
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 | |
---|
13 | gather () { |
---|
14 | $1 | sort | tr '\012' ' ' | sed -e 's/ $//' |
---|
15 | } |
---|
16 | |
---|
17 | check "bitsy's host address" 18.72.0.3 "`$SRCDIR/hostinfo -a bitsy 2>&1`" |
---|
18 | check "18.71.0.151's name" STRAWB.MIT.EDU. "`$SRCDIR/hostinfo -h 18.71.0.151 2>&1`" |
---|
19 | check "ls's hostinfo" "\"DEC/VAXSTATION-3100\"/\"UNIX\"" "`$SRCDIR/hostinfo -i ls 2>&1`" |
---|
20 | check "alum's MX record" alum.mit.edu. "`$SRCDIR/hostinfo -m alum.mit.edu 2>&1`" |
---|
21 | |
---|
22 | athmx=`gather "$SRCDIR/hostinfo -m athena"` |
---|
23 | outmx=`gather "$SRCDIR/hostinfo -m outgoing"` |
---|
24 | check "athena's MX records match outgoing's MX records" "$athmx" "$outmx" |
---|
25 | |
---|
26 | echo "Regression tests passed." |
---|
27 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.