3 # By Wouter Wijngaards, NLnet Labs, 2006.
6 # this version prefers gmake if available.
7 # adds variable LDNS for the LDNS path to use.
11 REPORT_FILE
=testdata
/testbed.report
12 LOG_FILE
=testdata
/testbed.log
13 HOST_FILE
=testdata
/host_file.
$USER
15 if test ! -f $HOST_FILE; then
16 echo "No such file: $HOST_FILE"
20 function echossh
() # like ssh but echos.
26 # Compile and run NSD on platforms
28 # parameters: <host> <dir>
29 # host is name of ssh host
30 # dir is directory of nsd trunk on host
32 echo "$1 begin on "`date` | tee -a $REPORT_FILE
35 if test $IP6 = no
; then
36 DISABLE
="--disable-ipv6"
38 if test x
$LDNS != x
; then
39 DISABLE
="--with-ldns=$LDNS $DISABLE"
41 if test x
$LIBEVENT != x
; then
42 DISABLE
="--with-libevent=$LIBEVENT $DISABLE"
45 cat >makeconf.mak.$$
<< EOF
46 #configure: configure.ac
49 Makefile: Makefile.in #configure
50 ./configure $CONFIGURE_FLAGS $DISABLE
53 scp makeconf.mak.$$
$1:$2
54 # determine make to use
55 tempx
=`ssh $1 "cd $2; which gmake"`
56 MAKE_CMD
=`ssh $1 "cd $2; if test -f '$tempx'; then echo $tempx; else echo $MAKE_CMD; fi"`
58 if test $SVN = yes; then
59 echossh
$1 "cd $2; svn up"
60 echossh
$1 "cd $2; $MAKE_CMD -f makeconf.mak.$$ configure"
62 # svn and autoconf locally
63 echo "fake svn via svnexport, tar, autoconf, bison, flex."
64 svn
export svn
+ssh://open.nlnetlabs.nl
/svn
/nsd
/trunk unbound_ttt
65 (cd unbound_ttt
; $AC_CMD; rm -r autom4te
* .c
-mode-rc.el .cvsignore
)
66 if test $FIXCONFIGURE = yes; then
67 echo fixing up configure length
test.
68 (cd unbound_ttt
; mv configure oldconf
; sed -e 's?while (test "X"?lt_cv_sys_max_cmd_len=65500; echo skip || while (test "X"?' <oldconf
>configure
; chmod +x .
/configure
)
71 rsync
-vrcpz --rsync-path=/home
/wouter
/bin
/rsync unbound_ttt
$1:unbound_ttt
72 # tar czf unbound_ttt.tgz unbound_ttt
74 # ls -al unbound_ttt.tgz
75 # scp unbound_ttt.tgz $1:unbound_ttt.tar.gz
77 # echossh $1 "gtar xzf unbound_ttt.tar.gz && rm unbound_ttt.tar.gz"
79 echossh
$1 "cd $2; $MAKE_CMD -f makeconf.mak.$$ Makefile"
80 echossh
$1 "cd $2; $MAKE_CMD all tests"
81 echossh
$1 "cd $2; $MAKE_CMD doc"
82 if test $RUN_TEST = yes; then
83 echossh
$1 "cd $2; bash testcode/do-tests.sh"
84 echossh
$1 "cd $2/testdata; sh ../testcode/mini_tpkg.sh -q report" | tee -a $REPORT_FILE
86 echossh
$1 "cd $2; rm -f makeconf.mak.$$"
88 echo "$1 end on "`date` | tee -a $REPORT_FILE
91 echo "on "`date`" by $USER." > $REPORT_FILE
92 echo "on "`date`" by $USER." > $LOG_FILE
95 declare -a hostname desc dir vars
98 while read a b c d
; do
99 if echo $a | grep "^#" >/dev
/null
; then
102 # append after arrays
109 echo "testing on $i hosts"
112 for((i
=0; i
<${#hostname[*]}; i
=$i+1)); do
113 if echo ${hostname[$i]} | grep "^#" >/dev
/null
; then
116 # echo "hostname=[${hostname[$i]}]"
117 # echo "desc=[${desc[$i]}]"
118 # echo "dir=[${dir[$i]}]"
119 # echo "vars=[${vars[$i]}]"
120 AC_CMD
="libtoolize -c --force; autoconf && autoheader"
129 echo "*** ${hostname[$i]} ${desc[$i]} ***" | tee -a $LOG_FILE | tee -a $REPORT_FILE
130 dotest
${hostname[$i]} ${dir[$i]} 2>&1 | tee -a $LOG_FILE