diff --git a/testing/do-tests b/testing/do-tests index 72379bda0..c48d64f54 100755 --- a/testing/do-tests +++ b/testing/do-tests @@ -48,6 +48,8 @@ TESTRESULTSHTML=$TODAYDIR/all.html INDEX=$TODAYDIR/index.html DEFAULTTESTSDIR=$UMLTESTDIR/testing/tests +SOURCEIP_ROUTING_TABLE=100 + testnumber="0" failed_cnt="0" passed_cnt="0" @@ -460,7 +462,7 @@ do $TESTRESULTDIR/${host}.$file > /dev/null 2>&1 done - ssh $HOSTLOGIN ip route list \ + ssh $HOSTLOGIN ip route list table $SOURCEIP_ROUTING_TABLE \ > $TESTRESULTDIR/${host}.iproute 2>/dev/null ssh $HOSTLOGIN iptables -v -n -L \ > $TESTRESULTDIR/${host}.iptables 2>/dev/null @@ -480,7 +482,7 @@ do
@@ -655,7 +657,7 @@ cecho-n "Copying test results to winnetou.." ssh root@${ipv4_winnetou} mkdir -p $HTDOCS/testresults > /dev/null 2>&1 scp -r $TODAYDIR root@${ipv4_winnetou}:$HTDOCS/testresults > /dev/null 2>&1 ssh root@${ipv4_winnetou} ln -s $HTDOCS/images $HTDOCS/testresults/$TESTDATE/images > /dev/null 2>&1 -cecho "done" +cgecho "done" cecho "" cecho "The results are available in $TODAYDIR" cecho "or via the link http://$ipv4_winnetou/testresults/$TESTDATE" diff --git a/testing/scripts/build-hostconfig b/testing/scripts/build-hostconfig index 0c2afd2c2..d75650f45 100755 --- a/testing/scripts/build-hostconfig +++ b/testing/scripts/build-hostconfig @@ -121,4 +121,4 @@ do esac done -cecho "done" +cgecho "done" diff --git a/testing/scripts/build-sshkeys b/testing/scripts/build-sshkeys index 23f62e005..eb74e72d7 100755 --- a/testing/scripts/build-sshkeys +++ b/testing/scripts/build-sshkeys @@ -37,25 +37,25 @@ if [ ! -f $LOGFILE ] then cecho-n " * Logfile '$LOGFILE' does not exist..creating.." touch $LOGFILE - cecho "done" + cgecho "done" fi if [ ! -d ~/.ssh ] then cecho-n " * Creating directory '~/.ssh'.." mkdir ~/.ssh - cecho "done" + cgecho "done" fi if [ -f ~/.ssh/known_hosts ] then cecho-n " * Backing up ~/.ssh/known_hosts to '~/.ssh/known_hosts.before_uml'.." cp -fp ~/.ssh/known_hosts ~/.ssh/known_hosts.before_uml - cecho "done" + cgecho "done" else cecho-n " * Creating '~/.ssh/known_hosts'" touch ~/.ssh/known_hosts - cecho "done" + cgecho "done" fi for host in $HOSTNAMEIPV4 @@ -68,7 +68,7 @@ do else cecho-n " * Adding uml host $HOSTNAME ($IP) to '~/.ssh/known_hosts'.." echo "$HOSTNAME,$IP `cat $DIR/../hosts/ssh_host_rsa_key.pub`" >> ~/.ssh/known_hosts - cecho "done" + cgecho "done" fi done @@ -84,5 +84,5 @@ else cecho "not found" cecho-n " * Generating ssh rsa key pair.." echo "" | ssh-keygen -N "" -t rsa -f ~/.ssh/id_rsa >> $LOGFILE 2>&1 - cecho "done" + cgecho "done" fi diff --git a/testing/scripts/build-umlhostfs b/testing/scripts/build-umlhostfs index 69ad9fe02..8bdd0c10c 100755 --- a/testing/scripts/build-umlhostfs +++ b/testing/scripts/build-umlhostfs @@ -32,7 +32,7 @@ if [ ! -d $BUILDDIR ] then cecho-n " * Directory '$BUILDDIR' does not exist..creating.." mkdir $BUILDDIR - cecho "done" + cgecho "done" fi LOGFILE=${BUILDDIR}/testing.log @@ -41,7 +41,7 @@ if [ ! -f $LOGFILE ] then cecho-n " * Logfile '$LOGFILE' does not exist..creating.." touch $LOGFILE - cecho "done" + cgecho "done" fi LOOPDIR=loop @@ -76,4 +76,4 @@ do umount $LOOPDIR done -cecho "done" +cgecho "done" diff --git a/testing/scripts/build-umlkernel b/testing/scripts/build-umlkernel index 074d7847a..ee10a13ce 100755 --- a/testing/scripts/build-umlkernel +++ b/testing/scripts/build-umlkernel @@ -75,12 +75,12 @@ if [ ! -f $LOGFILE ] then cecho-n " * Logfile '$LOGFILE' does not exist..creating.." touch $LOGFILE - cecho "done" + cgecho "done" fi cecho-n " * Unpacking kernel.." tar xjf $KERNEL >> $LOGFILE 2>&1 -cecho "done" +cgecho "done" KERNELDIR=${BUILDDIR}/linux-${KERNELVERSION} @@ -109,7 +109,7 @@ if [ $UMLPATCH ] then cecho-n " * Applying uml patch.." bzcat $UMLPATCH | patch -p1 >> $LOGFILE 2>&1 - cecho "done" + cgecho "done" fi ####################################################### @@ -125,10 +125,8 @@ make oldconfig ARCH=um >> $LOGFILE 2>&1 cecho-n " * Now compiling uml kernel.." make linux ARCH=um >> $LOGFILE 2>&1 -cecho "done" +cgecho "done" cecho-n " * Copying uml kernel to '${BUILDDIR}/linux-uml-${KERNELVERSION}'.." mv linux ${BUILDDIR}/linux-uml-${KERNELVERSION} -cecho "done" - - +cgecho "done" diff --git a/testing/scripts/build-umlrootfs b/testing/scripts/build-umlrootfs index f839e3e8e..eff4fa0c2 100755 --- a/testing/scripts/build-umlrootfs +++ b/testing/scripts/build-umlrootfs @@ -57,7 +57,7 @@ if [ ! -f $LOGFILE ] then cecho-n " * Logfile '$LOGFILE' does not exist..creating.." touch $LOGFILE - cecho "done" + cgecho "done" fi ROOTFSDIR=$BUILDDIR/root-fs @@ -66,7 +66,7 @@ if [ ! -d $ROOTFSDIR ] then cecho-n " * Root file system directory '$ROOTFSDIR' does not exist..creating.." mkdir $ROOTFSDIR - cecho "done" + cgecho "done" fi cd $ROOTFSDIR @@ -87,7 +87,7 @@ dd if=/dev/zero of=gentoo-fs count=$ROOTFSSIZE bs=1M >> $LOGFILE 2>&1 mkreiserfs -q -f gentoo-fs >> $LOGFILE 2>&1 mount -o loop gentoo-fs $LOOPDIR >> $LOGFILE 2>&1 tar xjpf $ROOTFS -C $LOOPDIR >> $LOGFILE 2>&1 -cecho "done" +cgecho "done" ###################################################### # remove /etc/resolv.conf @@ -150,10 +150,8 @@ echo "ldconfig" >> $INSTALLSHELL cecho-n " * Compiling $STRONGSWANVERSION within the root file system as chroot.." chroot $LOOPDIR /bin/bash /install.sh >> $LOGFILE 2>&1 -cecho "done" - rm -f $INSTALLSHELL - +cgecho "done" ###################################################### # copying the host's ssh public key diff --git a/testing/scripts/function.sh b/testing/scripts/function.sh index aa944924c..dad4fa8f7 100755 --- a/testing/scripts/function.sh +++ b/testing/scripts/function.sh @@ -24,6 +24,9 @@ function cecho { echo -e "\033[1;31m$1\033[0m" } +function cgecho { + echo -e "\033[1;32m$1\033[0m" +} function cecho-n { echo -en "\033[1;31m$1\033[0m" diff --git a/testing/scripts/kstart-umls b/testing/scripts/kstart-umls index eeaa959e8..2d4a943c7 100755 --- a/testing/scripts/kstart-umls +++ b/testing/scripts/kstart-umls @@ -68,7 +68,7 @@ do ubda=$UMLHOSTFS \ \$SWITCH_${host} \ mem=${MEM}M con=pty con0=fd:0,fd:1" & - cecho "\033[1;32mdone" + cgecho "done" fi let "x0+=dx" let "y0+=dy" @@ -114,7 +114,7 @@ do cecho "exit" exit 1 else - cecho "\033[1;32mup" + cgecho "up" fi done diff --git a/testing/scripts/start-switches b/testing/scripts/start-switches index aab82b8ff..dee24ddcd 100755 --- a/testing/scripts/start-switches +++ b/testing/scripts/start-switches @@ -31,9 +31,9 @@ do cecho " * Great, umlswitch$n is already running!" else cecho-n " * Starting umlswitch$n.." - uml_switch -tap tap$n -unix /tmp/umlswitch$n >/dev/null 2>&1 /dev/null 2>&1 /dev/null done -cecho "\033[1;32mdone" +cgecho "done" ##################################################### # Shutting down the uml switches @@ -47,5 +47,5 @@ cecho "\033[1;32mdone" cecho-n " * Stopping the UML switches.." killall uml_switch &> /dev/null rm -f /tmp/umlswitch[012] &> /dev/null 2>&1 -cecho "\033[1;32mdone" +cgecho "done"