2013-07-09 18:37:11 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# Copyright 2013 The Tor Project, Inc.
|
|
|
|
# See LICENSE for licensing information.
|
|
|
|
|
|
|
|
# coverage -- run gcov on the appropriate set of object files to extract
|
|
|
|
# coverage information.
|
|
|
|
|
2013-07-16 07:33:39 +02:00
|
|
|
dst=$1
|
|
|
|
|
2013-07-15 16:06:39 +02:00
|
|
|
for fn in src/or/*.c src/common/*.c; do
|
2013-07-09 18:37:11 +02:00
|
|
|
BN=`basename $fn`
|
|
|
|
DN=`dirname $fn`
|
|
|
|
F=`echo $BN | sed -e 's/\.c$//;'`
|
2013-07-16 07:33:39 +02:00
|
|
|
GC="${BN}.gcov"
|
2013-07-09 18:37:11 +02:00
|
|
|
gcov -o $DN/src_*$F.o $fn
|
2013-07-16 07:33:39 +02:00
|
|
|
if [ -n $dst ]
|
|
|
|
then
|
|
|
|
mv $GC $dst/$GC
|
|
|
|
fi
|
2013-07-09 18:37:11 +02:00
|
|
|
done
|