aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2015-11-05 15:20:46 +0100
committerTobias Brunner <tobias@strongswan.org>2015-11-09 15:18:37 +0100
commitd4908c06c1254228e383ecb91aaf336129f063c0 (patch)
treee0be1a39bda4f306d9d02755244b72d11fc88f14 /testing
parent0ea16f6b15051823687201b391540590a4805e3c (diff)
downloadstrongswan-d4908c06c1254228e383ecb91aaf336129f063c0.tar.bz2
strongswan-d4908c06c1254228e383ecb91aaf336129f063c0.tar.xz
testing: Report time required for all scenarios on test overview page
Diffstat (limited to 'testing')
-rwxr-xr-xtesting/do-tests17
1 files changed, 13 insertions, 4 deletions
diff --git a/testing/do-tests b/testing/do-tests
index 01a4f2382..f9be8a1b4 100755
--- a/testing/do-tests
+++ b/testing/do-tests
@@ -131,7 +131,7 @@ ENVIRONMENT_HEADER=$(cat <<@EOF
<tr>
<td width="100">&nbsp;</td>
<td width="300">&nbsp;</td>
- <td width=" 50">&nbsp;</td>
+ <td width=" 80">&nbsp;</td>
<td >&nbsp;</td>
</tr>
@EOF
@@ -159,7 +159,8 @@ cat > $TESTRESULTSHTML <<@EOF
<tr align="left">
<th>Number</th>
<th>Test</th>
- <th colspan="2">Result</th>
+ <th align="right">Time [s]</th>
+ <th>Result</th>
</tr>
@EOF
@@ -249,6 +250,8 @@ do
testname=$SUBDIR/$name
log_action " $testnumber $testname:"
+ teststart=$(date +%s)
+
if [ ! -d $DEFAULTTESTSDIR/${testname} ]
then
echo "is missing..skipped"
@@ -782,6 +785,9 @@ do
##########################################################################
# write test status to html file
#
+ testend=$(date +%s)
+ let "testend -= teststart"
+ let "timetotal += testend"
if [ $STATUS = "passed" ]
then
@@ -796,8 +802,8 @@ do
<tr>
<td>$testnumber</td>
<td><a href="$testname/index.html">$testname</a></td>
+ <td align="right">$testend</td>
<td><a href="$testname/console.log"><font color="$COLOR">$STATUS</font></a></td>
- <td>&nbsp;</td>
</tr>
@EOF
cat >> $SUBTESTSINDEX << @EOF
@@ -839,6 +845,9 @@ cat >> $TESTRESULTSHTML << @EOF
<tr>
<td><b>Failed</b></td><td><b><font color="red">$failed_cnt</font></b></td><td>&nbsp;</td><td>&nbsp;</td>
</tr>
+ <tr>
+ <td><b>Time [s]</b></td><td><b><font color="blue">$timetotal</font></b></td><td>&nbsp;</td><td>&nbsp;</td>
+ </tr>
</table>
</body>
</html>
@@ -883,6 +892,6 @@ echo
echo "The results are available in $TODAYDIR"
echo "or via the link http://$ipv4_winnetou/testresults/$TESTDATE"
-ENDDATE=`date +%Y%m%d-%H%M`
+ENDDATE=`date +%Y%m%d-%H%M-%S`
echo
echo "Finished : $ENDDATE"