update to 9.7.1-P2
[tridge/bind9.git] / bin / tests / system / checkconf / tests.sh
1 # Copyright (C) 2005, 2007, 2010  Internet Systems Consortium, Inc. ("ISC")
2 #
3 # Permission to use, copy, modify, and/or distribute this software for any
4 # purpose with or without fee is hereby granted, provided that the above
5 # copyright notice and this permission notice appear in all copies.
6 #
7 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
8 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9 # AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
10 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
12 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13 # PERFORMANCE OF THIS SOFTWARE.
14
15 # $Id: tests.sh,v 1.3.558.2 2010/06/02 01:27:20 tbox Exp $
16
17 SYSTEMTESTTOP=..
18 . $SYSTEMTESTTOP/conf.sh
19
20 status=0
21
22 echo "I: checking that named-checkconf handles a known good config"
23
24 ret=0
25 $CHECKCONF good.conf > /dev/null 2>&1 || ret=1
26 if [ $ret != 0 ]; then echo "I:failed"; fi
27 status=`expr $status + $ret`
28
29 echo "I: checking that named-checkconf prints a known good config"
30 ret=0
31 $CHECKCONF -p good.conf > /dev/null 2>&1 || ret=1
32 if [ $ret != 0 ]; then echo "I:failed"; fi
33 status=`expr $status + $ret`
34 echo "I: checking that named-checkconf handles a known bad config"
35
36 ret=1
37 $CHECKCONF bad.conf > /dev/null 2>&1 || ret=0
38 if [ $ret != 0 ]; then echo "I:failed"; fi
39 status=`expr $status + $ret`
40
41 echo "I:exit status: $status"
42 exit $status