3 # Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (C) 2000, 2001 Internet Software Consortium.
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 # PERFORMANCE OF THIS SOFTWARE.
18 # Id: run.sh,v 1.42 2007/06/19 23:47:00 tbox Exp
25 .
$SYSTEMTESTTOP/conf.sh
30 --keep) stopservers
=false
; shift ;;
33 test $# -gt 0 ||
{ echo "usage: $0 [--keep] test-directory" >&2; exit 1; }
38 test -d $test ||
{ echo "$0: $test: no such test" >&2; exit 1; }
40 echo "S:$test:`date`" >&2
41 echo "T:$test:1:A" >&2
42 echo "A:System test $test" >&2
46 echo "I:Perl not available. Skipping test." >&2
48 echo "E:$test:`date`" >&2
52 $PERL testsock.pl ||
{
53 echo "I:Network interface aliases not set up. Skipping test." >&2;
54 echo "R:UNTESTED" >&2;
55 echo "E:$test:`date`" >&2;
60 # Check for test-specific prerequisites.
62 test ! -f $test/prereq.sh ||
63 ( cd $test && sh prereq.sh
"$@" )
67 echo "I:Prerequisites for $test missing, skipping test." >&2
69 echo "E:$test:`date`" >&2
73 # Set up any dynamically generated test data
74 if test -f $test/setup.sh
76 ( cd $test && sh setup.sh
"$@" )
79 # Start name servers running
80 $PERL start.pl
$test ||
exit 1
83 ( cd $test ; sh tests.sh
)
97 status
=`expr $status + $?`
99 if [ $status != 0 ]; then
101 # Don't clean up - we need the evidence.
102 find .
-name core
-exec chmod 0644 '{}' \
;
107 if test -f $test/clean.sh
109 ( cd $test && sh clean.sh
"$@" )
113 echo "E:$test:`date`"