aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-08-29 19:15:24 +0200
committerTobias Brunner <tobias@strongswan.org>2016-08-30 15:03:40 +0200
commitbdd7c42fc0d9d5804b76df5bc2d88a3f1fc76f64 (patch)
tree4a4e7bb6acc846552e9bd44029869e0d244182d3
parentdda06b0439f23a1191c57b505c96251e63e8a690 (diff)
downloadstrongswan-bdd7c42fc0d9d5804b76df5bc2d88a3f1fc76f64.tar.bz2
strongswan-bdd7c42fc0d9d5804b76df5bc2d88a3f1fc76f64.tar.xz
testing: Report number of tests per subdirectory in main index
-rwxr-xr-xtesting/do-tests29
1 files changed, 22 insertions, 7 deletions
diff --git a/testing/do-tests b/testing/do-tests
index fcadd7942..6548345e1 100755
--- a/testing/do-tests
+++ b/testing/do-tests
@@ -46,6 +46,7 @@ SOURCEIP_ROUTING_TABLE=220
testnumber="0"
failed_cnt="0"
passed_cnt="0"
+subdir_cnt="0"
##############################################################################
# copy default tests to $BUILDDIR
@@ -185,13 +186,11 @@ echo
##############################################################################
# enter specific test directory
#
-
if [ $# -gt 0 ]
then
- TESTS=$*
+ TESTS=$(printf "%s\n" $* | sort -u)
else
- # set internal field seperator
- TESTS="`ls $DEFAULTTESTSDIR`"
+ TESTS=$(ls $DEFAULTTESTSDIR)
fi
for SUBDIR in $TESTS
@@ -214,12 +213,18 @@ do
else
FIRST="&nbsp;"
fi
+
+ if [ $subdir_cnt != 0 ]
+ then
+ echo " <td align=\"right\">$subdir_cnt</td>" >> $INDEX
+ echo " <td>&nbsp;</td>" >> $INDEX
+ echo " </tr>" >> $INDEX
+ subdir_cnt="0"
+ fi
echo " <tr>" >> $INDEX
echo " <td>$FIRST</td>">> $INDEX
echo " <td><a href=\"$SUBDIR/index.html\">$SUBDIR</a></td>" >> $INDEX
- echo " <td align=\"right\">x</td>" >> $INDEX
- echo " <td>&nbsp;</td>" >> $INDEX
- echo " </tr>" >> $INDEX
+
SUBTESTSINDEX=$TODAYDIR/$SUBDIR/index.html
cat > $SUBTESTSINDEX <<@EOF
<html>
@@ -259,6 +264,7 @@ do
for name in $SUBTESTS
do
let "testnumber += 1"
+ let "subdir_cnt += 1"
testname=$SUBDIR/$name
log_action " $testnumber $testname:"
@@ -900,6 +906,15 @@ cat >> $TESTRESULTSHTML << @EOF
</html>
@EOF
+if [ $subdir_cnt != 0 ]
+then
+cat >> $INDEX << @EOF
+ <td align="right">$subdir_cnt</td>
+ <td>&nbsp;</td>
+ </tr>
+@EOF
+fi
+
let "all_cnt = $passed_cnt + $failed_cnt"
cat >> $INDEX << @EOF