Skip to content
Permalink
Browse files

Added a runtests bash shell script in src that will iteratively run t…

…ests in all dirs below this point. Sample output:

-------------------------------
MODULE : core
-------------------------------
MODULE TESTS  : 33
MODULE TEST CASES PASSED  : 293
MODULE TEST CASES FAILED  : 0
MODULE TEST CASES SKIPPED : 0
-------------------------------
MODULE : gui
-------------------------------
MODULE TESTS  : 70
MODULE TEST CASES PASSED  : 924
MODULE TEST CASES FAILED  : 0
MODULE TEST CASES SKIPPED : 0
-------------------------------
TOTALS :
-------------------------------
TOTAL TESTS  : 103
TOTAL TEST CASES PASSED  : 1217
TOTAL TEST CASES FAILED  : 0
TOTAL TEST CASES SKIPPED : 0
       


git-svn-id: http://svn.osgeo.org/qgis/trunk@5253 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Apr 11, 2006
1 parent 8d5c4b2 commit 6b8a5c711688856b2b3173c9f06cdf74756547b1
Showing with 47 additions and 0 deletions.
  1. +47 −0 tests/src/runtests.sh
@@ -0,0 +1,47 @@
#!/bin/bash
#set -x
DIRS=`ls -lah | grep ^d|grep -v '\.$' |grep -v '\.\.$' |grep -v '.svn' |awk '{print $8}' | awk '$1=$1' RS=`

TOTALDIRS=0
TOTALEXES=0
TOTALFAILED=0
TOTALPASSED=0
TOTALSKIPPED=0
for DIR in $DIRS
do
TOTALDIREXES=0
TOTALDIRFAILED=0
TOTALDIRPASSED=0
TOTALDIRSKIPPED=0
LIST=`ls -lah $DIR |grep rwxr-xr-x |grep -v ^d |grep -v pl$ |grep -v ~$ |grep -v .sh$ |awk '{print $8}'|awk '$1=$1' RS=`
for FILE in $LIST
do
RESULT=`$DIR/${FILE} | tail -2 |head -1` #TODO maybe just grep for 'Totals'
PASSED=`echo ${RESULT} | awk '{print $2}'`
FAILED=`echo ${RESULT} | awk '{print $4}'`
SKIPPED=`echo ${RESULT} | awk '{print $6}'`
TOTALDIRFAILED=`expr $TOTALDIRFAILED + $FAILED`
TOTALDIRPASSED=`expr $TOTALDIRPASSED + $PASSED`
TOTALDIRSKIPPED=`expr $TOTALDIRSKIPPED + $SKIPPED`
TOTALDIREXES=`expr $TOTALDIREXES + 1`
TOTALFAILED=`expr $TOTALFAILED + $FAILED`
TOTALPASSED=`expr $TOTALPASSED + $PASSED`
TOTALSKIPPED=`expr $TOTALSKIPPED + $SKIPPED`
TOTALEXES=`expr $TOTALEXES + 1`
done
TOTALDIRS=`expr $TOTALDIRS + 1`
echo "-------------------------------"
echo "MODULE : $DIR"
echo "-------------------------------"
echo "MODULE TESTS : ${TOTALDIREXES}"
echo "MODULE TEST CASES PASSED : ${TOTALDIRPASSED}"
echo "MODULE TEST CASES FAILED : ${TOTALDIRFAILED}"
echo "MODULE TEST CASES SKIPPED : ${TOTALDIRSKIPPED}"
done
echo "-------------------------------"
echo " TOTALS :"
echo "-------------------------------"
echo "TOTAL TESTS : ${TOTALEXES}"
echo "TOTAL TEST CASES PASSED : ${TOTALPASSED}"
echo "TOTAL TEST CASES FAILED : ${TOTALFAILED}"
echo "TOTAL TEST CASES SKIPPED : ${TOTALSKIPPED}"

0 comments on commit 6b8a5c7

Please sign in to comment.
You can’t perform that action at this time.