From d4908c06c1254228e383ecb91aaf336129f063c0 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 5 Nov 2015 15:20:46 +0100 Subject: [PATCH] testing: Report time required for all scenarios on test overview page --- testing/do-tests | 17 +++++++++++++---- 1 file 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     -   +     @EOF @@ -159,7 +159,8 @@ cat > $TESTRESULTSHTML <<@EOF Number Test - Result + Time [s] + Result @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 $testnumber $testname + $testend $STATUS -   @EOF cat >> $SUBTESTSINDEX << @EOF @@ -839,6 +845,9 @@ cat >> $TESTRESULTSHTML << @EOF Failed$failed_cnt   + + Time [s]$timetotal   + @@ -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"