summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2007-11-11 17:58:00 -0500
committerDavid Zeuthen <davidz@redhat.com>2007-11-11 17:58:00 -0500
commit9fe5005e8ffad96562893e7b1cae79f35a7edd89 (patch)
treeae813b0b340bc7a5876efae13d25d85d8b3e8802 /test
parent756043c71cc000e080ebff0dbc9aacf3ee146636 (diff)
downloadpolkit-9fe5005e8ffad96562893e7b1cae79f35a7edd89.tar.gz
tweak how we do coverage reporting
Diffstat (limited to 'test')
-rwxr-xr-xtest/create-coverage-report.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/create-coverage-report.sh b/test/create-coverage-report.sh
index 336a5bd..cb14a1e 100755
--- a/test/create-coverage-report.sh
+++ b/test/create-coverage-report.sh
@@ -4,19 +4,20 @@ TOTAL_ACTUAL=0
TOTAL_COVERED=0
TOTAL_SOURCE=0
+P=$(dirname $0)/..
+
MODULE=$1
shift
+
echo "=============================================================================="
-echo "Test coverage for module $MODULE:"
+echo "Test coverage for $MODULE:"
echo "=============================================================================="
while [ $# -gt 0 ] ; do
- gcov $1 -o .libs/ > /dev/null
-
- SOURCE=`cat $1 |wc -l`
- ACTUAL=`grep -v " -:" $1.gcov |wc -l`
- NOT_COVERED=`grep " #####:" $1.gcov |wc -l`
+ SOURCE=`cat $P/$1 |wc -l`
+ ACTUAL=`grep -v " -:" $P/$1.gcov |wc -l`
+ NOT_COVERED=`grep " #####:" $P/$1.gcov |wc -l`
COVERED=$(($ACTUAL - $NOT_COVERED))
PERCENT=$((100 * $COVERED / $ACTUAL))