3 # Copyright (C) 2004, 2007, 2010, 2012, 2014 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.
23 .
$SYSTEMTESTTOP/conf.sh
28 --keep) stopservers
=false
; shift ;;
31 test $# -gt 0 ||
{ echo "usage: $0 [--keep] test-directory" >&2; exit 1; }
36 test -d $test ||
{ echo "$0: $test: no such test" >&2; exit 1; }
38 echo "S:$test:`date`" >&2
39 echo "T:$test:1:A" >&2
40 echo "A:System test $test" >&2
42 if [ x
${PERL:+set} = x
]
44 echo "I:Perl not available. Skipping test." >&2
46 echo "E:$test:`date`" >&2
50 $PERL testsock.pl ||
{
51 echo "I:Network interface aliases not set up. Skipping test." >&2;
52 echo "R:UNTESTED" >&2;
53 echo "E:$test:`date`" >&2;
58 # Check for test-specific prerequisites.
59 test ! -f $test/prereq.sh ||
( cd $test && $SHELL prereq.sh
"$@" )
62 if [ $result -eq 0 ]; then
65 echo "I:Prerequisites for $test missing, skipping test." >&2
66 [ $result -eq 255 ] && echo "R:SKIPPED" ||
echo "R:UNTESTED"
67 echo "E:$test:`date`" >&2
71 # Check for PKCS#11 support
73 test ! -f $test/usepkcs11 ||
$SHELL cleanpkcs11.sh
77 echo "I:Need PKCS#11 for $test, skipping test." >&2
78 echo "R:PKCS11ONLY" >&2
79 echo "E:$test:`date`" >&2
83 # Set up any dynamically generated test data
84 if test -f $test/setup.sh
86 ( cd $test && $SHELL setup.sh
"$@" )
89 # Start name servers running
90 $PERL start.pl
$test ||
exit 1
93 ( cd $test ; $SHELL tests.sh
)
107 status
=`expr $status + $?`
109 if [ $status != 0 ]; then
111 # Don't clean up - we need the evidence.
112 find .
-name core
-exec chmod 0644 '{}' \
;
117 rm -f $SYSTEMTESTTOP/random.data
118 if test -f $test/clean.sh
120 ( cd $test && $SHELL clean.sh
"$@" )
124 echo "E:$test:`date`"