Changeset 4557

Show
Ignore:
Timestamp:
04/22/09 23:18:15 (4 years ago)
Author:
getxsick
Message:

add coverage.py tool to analyze tests
modify run_tests.sh script to handle with it - now it shows statistics
also option '-m' (need to be pass as a first argument!) gives extra stats

Location:
branch/UMPA
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • branch/UMPA/run_tests.sh

    r4513 r4557  
    1 #!/bin/sh 
     1#!/bin/bash 
     2 
     3cur=`pwd` 
     4cd /tmp 
     5 
     6rm -f .coverage 2>/dev/null 
     7if [ $? -eq 1 ]; then 
     8        echo "#### ERROR ####" 
     9        echo "Can't remove /tmp/.coverage" 
     10        echo "Please remove it manually first" 
     11        echo "#### ERROR ####" 
     12        exit 1 
     13fi 
     14 
     15m="" 
     16if [ $# -gt 0 ]  && [ $1 == "-m" ]; then 
     17        m=$1 
     18        shift 
     19fi 
    220 
    321echo "#### TESTS FOR UMPA [ START ] ####" 
    4 py/bin/py.test $* tests 
     22$cur/tests/coverage.py -x $cur/py/bin/py.test $* $cur/tests 
    523echo "#### TESTS FOR UMPA [ FINISH ] ####" 
     24 
     25echo "#### STATS FOR UMPA [ START ] ####" 
     26$cur/tests/coverage.py -r $m --omit=/usr/lib,$cur/tests,$cur/py 
     27echo "#### STATS FOR UMPA [ FINISH ] ####" 
     28cd $cur