diff options
Diffstat (limited to 'scripts/test/coverage')
-rwxr-xr-x | scripts/test/coverage | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/test/coverage b/scripts/test/coverage index f4ae475828..f61c83bc72 100755 --- a/scripts/test/coverage +++ b/scripts/test/coverage @@ -7,31 +7,31 @@ dst=$1 -for fn in src/or/*.c src/common/*.c; do - BN=`basename $fn` - DN=`dirname $fn` - F=`echo $BN | sed -e 's/\.c$//;'` +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" # Figure out the object file names - ONS=`echo ${DN}/src_*-${F}.o` - ONS_WILDCARD_LITERAL="${DN}/src_*-${F}.o" + ONS=$(echo "${DN}"/*testing_a-"${F}".o) + ONS_WILDCARD_LITERAL="${DN}/*testing_a-${F}.o" # If the wildcard didn't expand, no files if [ "$ONS" != "${ONS_WILDCARD_LITERAL}" ] then for on in $ONS; do # We should have a gcno file - GCNO=`echo $on | sed -e 's/\.o$/\.gcno/;'` - if [ -e $GCNO ] + GCNO=$(echo "$on" | sed -e 's/\.o$/\.gcno/;') + if [ -e "$GCNO" ] then # No need to test for gcda, since gcov assumes no execution # if it's absent - rm -f $GC - gcov -o $on $fn - if [ -e $GC ] + rm -f "$GC" + gcov -o "$on" "$fn" + if [ -e "$GC" ] then - if [ -n $dst ] + if [ -d "$dst" ] then - mv $GC $dst/$GC + mv "$GC" "$dst"/"$GC" fi else echo "gcov -o $on $fn didn't make a .gcov file" |