use MAX_RADIUS_ATTRIBUTE_SIZE constant from radius_message header file
[strongswan.git] / testing / do-tests.in
index 2e67e93..67c2e7a 100755 (executable)
@@ -117,13 +117,7 @@ done
 KERNEL_VERSION=`basename $KERNEL .tar.bz2`
 IPSEC_VERSION=`basename $STRONGSWAN .tar.bz2`
 
-cat > $INDEX <<@EOF
-<html>
-<head>
-  <title>strongSwan UML Tests</title>
-</head>
-<body>
-  <h2>strongSwan UML Tests</h2>
+ENVIRONMENT_HEADER=$(cat <<@EOF
   <table border="0" cellspacing="2">
     <tr valign="top">
       <td><b>Host:</b></td>
@@ -148,9 +142,27 @@ cat > $INDEX <<@EOF
       <td >&nbsp;</td>
     </tr>
 @EOF
+)
 
-cat $INDEX > $TESTRESULTSHTML
-cat >> $TESTRESULTSHTML <<@EOF
+cat > $INDEX <<@EOF
+<html>
+<head>
+  <title>strongSwan UML Tests</title>
+</head>
+<body>
+  <h2>strongSwan UML Tests</h2>
+  $ENVIRONMENT_HEADER
+@EOF
+
+cat > $TESTRESULTSHTML <<@EOF
+<html>
+<head>
+  <title>strongSwan UML Tests - All Tests</title>
+</head>
+<body>
+  <div><a href="index.html">strongSwan UML Tests</a> / All Tests</div>
+  <h2>All Tests</h2>
+  $ENVIRONMENT_HEADER
     <tr align="left">
       <th>Number</th>
       <th>Test</th>
@@ -213,6 +225,7 @@ do
   <title>strongSwan $SUBDIR Tests</title>
 </head>
 <body>
+  <div><a href="../index.html">strongSwan UML Tests</a> / $SUBDIR</div>
   <h2>strongSwan $SUBDIR Tests</h2>
   <table border="0" cellspacing="2">
     <tr valign="top">
@@ -343,6 +356,7 @@ do
        #
 
        $DIR/scripts/load-testconfig $testname
+       unset RADIUSHOSTS
        source $TESTDIR/test.conf
 
 
@@ -454,8 +468,9 @@ do
   <title>Test $testname</title>
 </head>
 <body>
-<table border="0" width="600">
+<table border="0" cellpadding="0" cellspacing="0" width="600">
   <tr><td>
+    <div><a href="../../index.html">strongSwan UML Tests</a> / <a href="../index.html">$SUBDIR</a> / $name</div>
     <h2>Test $testname</h2>
     <h3>Description</h3>
 @EOF
@@ -541,6 +556,9 @@ do
                    $TESTRESULTDIR/${host}.$file  > /dev/null 2>&1
            done
 
+               scp $SSHCONF $HOSTLOGIN:/etc/strongswan.conf \
+                   $TESTRESULTDIR/${host}.strongswan.conf  > /dev/null 2>&1
+
            scp $SSHCONF $HOSTLOGIN:/var/log/radius/radius.log \
                $TESTRESULTDIR/${host}.radius.log  > /dev/null 2>&1
 
@@ -553,12 +571,14 @@ do
          <ul>
            <li><a href="$host.clients.conf">clients.conf</a></li>
            <li><a href="$host.radiusd.conf">radiusd.conf</a></li>
+           <li><a href="$host.strongswan.conf">strongswan.conf</a></li>
          </ul>
        </td>
        <td valign="top">
          <ul>
            <li><a href="$host.eap.conf">eap.conf</a></li>
            <li><a href="$host.radius.log">radius.log</a></li>
+           <li><a href="$host.daemon.log">daemon.log</a></li>
          </ul>
       </td>
        <td valign="top">
@@ -575,9 +595,6 @@ do
 
        cat >> $TESTRESULTDIR/index.html <<@EOF
   </td></tr>
-  <tr><td align="right">
-    <b><a href="../index.html">Back</a></b>
-  </td></tr>
 </table>
 </body>
 </html>
@@ -632,6 +649,18 @@ do
 
 
        ##########################################################################
+       # get a copy of /var/log/daemon.log
+       #
+
+       for host in $RADIUSHOSTS
+       do
+           eval HOSTLOGIN=root@\$ipv4_${host}
+           ssh $SSHCONF $HOSTLOGIN grep imcv /var/log/daemon.log \
+               >> $TESTRESULTDIR/${host}.daemon.log
+       done
+
+
+       ##########################################################################
        # stop tcpdump if necessary
        #
 
@@ -669,7 +698,7 @@ do
        cat >> $TESTRESULTSHTML << @EOF
   <tr>
     <td>$testnumber</td>
-    <td><a href="$testname/">$testname</a></td>
+    <td><a href="$testname/index.html">$testname</a></td>
     <td><a href="$testname/console.log"><font color="$COLOR">$STATUS</font></a></td>
     <td>&nbsp;</td>
   </tr>
@@ -677,7 +706,7 @@ do
        cat >> $SUBTESTSINDEX << @EOF
   <tr>
     <td>$testnumber</td>
-    <td><a href="$name/">$name</a></td>
+    <td><a href="$name/index.html">$name</a></td>
     <td><a href="$name/console.log"><font color="$COLOR">$STATUS</font></a></td>
     <td>&nbsp;</td>
   </tr>
@@ -704,11 +733,16 @@ done
 #
 
 cat >> $TESTRESULTSHTML << @EOF
+    <tr>
+      <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td><b>Passed:</b></td><td><b><font color="green">$passed_cnt</font></b></td><td>&nbsp;</td><td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td><b>Failed:</b></td><td><b><font color="red">$failed_cnt</font></b></td><td>&nbsp;</td><td>&nbsp;</td>
+    </tr>
   </table>
-  <p>
-  <b>Passed: &nbsp; <font color="green">$passed_cnt</font></b><br>
-  <b>Failed: &nbsp; <font color="red">$failed_cnt</font></b><br>
-  <p>
 </body>
 </html>
 @EOF