12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #!/bin/sh
- dst=$1
- for fn in src/core/*/*.c src/feature/*/*.c src/app/*/*.c src/lib/*/*.c; do
- BN=`basename $fn`
- DN=`dirname $fn`
- F=`echo $BN | sed -e 's/\.c$//;'`
- GC="${BN}.gcov"
-
- ONS=$(echo "${DN}"/*testing_a-"${F}".o)
- ONS_WILDCARD_LITERAL="${DN}/*testing_a-${F}.o"
-
- if [ "$ONS" != "${ONS_WILDCARD_LITERAL}" ]
- then
- for on in $ONS; do
-
- GCNO=`echo $on | sed -e 's/\.o$/\.gcno/;'`
- if [ -e $GCNO ]
- then
-
-
- rm -f $GC
- gcov -o $on $fn
- if [ -e $GC ]
- then
- if [ -d "$dst" ]
- then
- mv $GC $dst/$GC
- fi
- else
- echo "gcov -o $on $fn didn't make a .gcov file"
- fi
- else
- echo "Couldn't find gcno file for $on"
- fi
- done
- else
- echo "No object file found matching source file $fn"
- fi
- done
|