Home | History | Annotate | Line # | Download | only in tests
      1 #!/bin/sh
      2 
      3 #set -x
      4 
      5 if [ $# -ne 1 ]; then
      6 	echo "usage: $0 test-name" >&2
      7 	exit 1
      8 fi
      9 
     10 if [ x$KEA4 = x ]; then
     11 	echo "KEA4 is not set" >&2
     12 fi
     13 if [ x$KEA6 = x ]; then
     14 	echo "KEA6 is not set" >&2
     15 fi
     16 
     17 file=$1
     18 
     19 cd "$(dirname "$0")"
     20 
     21 isout=$(expr $file : ".*\.out")
     22 if [ $isout -eq 0 ]; then
     23 	full=$file.out
     24 else
     25 	full=$file
     26 fi
     27 if [ ! -f $full ]; then
     28 	echo "can't find $file" >&2
     29 	exit 1
     30 fi
     31 
     32 is4=$(expr $file : ".*4")
     33 is6=$(expr $file : ".*6")
     34 if [ \( $is4 -eq 0 \) -a \( $is6 -eq 0 \) ]; then
     35 	echo "can't get version from $file" >&2
     36 	exit 1
     37 fi
     38 
     39 base=$(basename $full .out)
     40 log=/tmp/$base.log$$
     41 if [ $is4 -ne 0 ]; then
     42 	$KEA4 -t $full >& $log
     43 	if [ $? -ne 0 ]; then
     44 		echo "$full raised an error" >&2
     45 		exit 1
     46 	fi
     47 fi
     48 if [ $is6 -ne 0 ]; then
     49 	$KEA6 -t $full >& $log
     50 	if [ $? -ne 0 ]; then
     51 		echo "$full raised an error" >&2
     52 		exit 1
     53 	fi
     54 fi
     55