2 # Copyright 2013 The Tor Project, Inc.
3 # See LICENSE for licensing information.
5 # coverage -- run gcov on the appropriate set of object files to extract
6 # coverage information.
10 for fn
in src
/or
/*.c src
/common
/*.c
; do
13 F
=`echo $BN | sed -e 's/\.c$//;'`
15 # Figure out the object file names
16 ONS
=`echo ${DN}/src_*-${F}.o`
17 ONS_WILDCARD_LITERAL
="${DN}/src_*-${F}.o"
18 # If the wildcard didn't expand, no files
19 if [ "$ONS" != "${ONS_WILDCARD_LITERAL}" ]
22 # We should have a gcno file
23 GCNO
=`echo $on | sed -e 's/\.o$/\.gcno/;'`
26 # No need to test for gcda, since gcov assumes no execution
37 echo "gcov -o $on $fn didn't make a .gcov file"
40 echo "Couldn't find gcno file for $on"
44 echo "No object file found matching source file $fn"