X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=blobdiff_plain;f=testing%2Fdo-tests;h=537a4398eb1cf9e56b00ce935c0e1953b92b8a5a;hp=156a7e0a4484cacb18a84a30898fe9e4dfce1354;hb=ad9da6ec4b97357af944dc8319d5bcf3f373d14f;hpb=114c6646af8ca30de439e0457cf9346a26e5b0a3 diff --git a/testing/do-tests b/testing/do-tests index 156a7e0..537a439 100755 --- a/testing/do-tests +++ b/testing/do-tests @@ -44,8 +44,8 @@ TESTDATE=`date +%Y%m%d-%H%M` TODAYDIR=$TESTRESULTSDIR/$TESTDATE mkdir $TODAYDIR -TESTRESULTSHTML=$TODAYDIR/index.html -ALLHTML=$TODAYDIR/all.html +TESTRESULTSHTML=$TODAYDIR/all.html +INDEX=$TODAYDIR/index.html DEFAULTTESTSDIR=$UMLTESTDIR/testing/tests testnumber="0" @@ -105,22 +105,45 @@ done KERNEL_VERSION=`basename $KERNEL .tar.bz2` IPSEC_VERSION=`basename $STRONGSWAN .tar.bz2` -cat > $TESTRESULTSHTML <<@EOF +cat > $INDEX <<@EOF - strongSwan UML Testing + strongSwan UML Tests -

strongSwan UML Testing

+

strongSwan UML Tests

- - - - -
Host:`uname -a`
UML kernel:  $KERNEL_VERSION
IPsec:$IPSEC_VERSION
Date:$TESTDATE
-

- - + + + + + + + + + + + + + + + + + + + + + + +@EOF + +cat $INDEX > $TESTRESULTSHTML +cat >> $TESTRESULTSHTML <<@EOF + + + + + @EOF cecho "UML kernel: $KERNEL_VERSION" @@ -156,6 +179,51 @@ do SUBDIR="`dirname $SUBDIR`" fi + if [ ! -d $TODAYDIR/$SUBDIR ] + then + mkdir $TODAYDIR/$SUBDIR + if [ $testnumber == 0 ] + then + FIRST="Category:" >> $INDEX + SUBTESTSINDEX=$TODAYDIR/$SUBDIR/index.html + cat > $SUBTESTSINDEX <<@EOF + + + strongSwan $SUBDIR Tests + + +

strongSwan $SUBDIR Tests

+
NumberTestResult
Host:`uname -a`
UML kernel:  $KERNEL_VERSION
IPsec:$IPSEC_VERSION
Date:$TESTDATE
    
NumberTestResult
$FIRST$SUBDIR
+ + + + + + + + + + + + + + + + + + + + + + + +@EOF + fi + for name in $SUBTESTS do let "testnumber += 1" @@ -315,19 +383,6 @@ do printf("echo \"%s# cat /tmp/tcpdump.log | grep \047%s\047 [%s]\"; ", host, pattern, hit) printf("ssh root@\044ipv4_%s cat /tmp/tcpdump.log | grep \"%s\"; ", host, pattern) } - else if (command == "tcpdumpcount") - { - printf("if [ \044TDUP_%s == \"true\" ]; then stop_tcpdump %s; fi; \n", host, host) - printf("echo -e \"%s# [ \\\\140cat /tmp/tcpdump.log | grep \047%s\047 | tee -a /dev/stderr | wc -l\\\\140 -eq %s ] [YES]\"; ", host, pattern, hit) - printf("tcpdumpcount=\`ssh root@\044ipv4_%s cat /tmp/tcpdump.log | grep \"%s\" | tee -a /dev/stderr | wc -l\`; ", host, pattern) - printf("[ \044tcpdumpcount -eq %s ]; ", hit) - hit="YES" - } - else if (command == "cmd") - { - printf("echo \"%s# %s [%s]\"; ", host, pattern, hit) - printf("ssh root@\044ipv4_%s %s; ", host, pattern) - } else { printf("echo \"%s# %s | grep \047%s\047 [%s]\"; ", host, command, pattern, hit) @@ -396,16 +451,32 @@ do $TESTRESULTDIR/${host}.$file > /dev/null 2>&1 done + ssh $HOSTLOGIN ip route list \ + > $TESTRESULTDIR/${host}.iproute 2>/dev/null + ssh $HOSTLOGIN iptables -v -n -L \ + > $TESTRESULTDIR/${host}.iptables 2>/dev/null cat >> $TESTRESULTDIR/index.html <<@EOF

$host

- +
UML kernel:  $KERNEL_VERSION
IPsec:$IPSEC_VERSION
Date:$TESTDATE
    
NumberTestResult
+ + + + +
+ + + +
@EOF done @@ -507,10 +578,20 @@ do $testnumber $testname $STATUS +   + +@EOF + cat >> $SUBTESTSINDEX << @EOF + + $testnumber + $name + $STATUS +   @EOF done + done @@ -521,13 +602,33 @@ done cat >> $TESTRESULTSHTML << @EOF

- Passed:   $passed_cnt
- Failed:   $failed_cnt
+ Passed:   $passed_cnt
+ Failed:   $failed_cnt

@EOF +let "all_cnt = $passed_cnt + $failed_cnt" + +cat >> $INDEX << @EOF + +   + all + $all_cnt +   + + + Failed: +   + $failed_cnt +   + + + + +@EOF + cecho "" cecho "Passed: $passed_cnt" cecho "Failed: $failed_cnt"