diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-11-19 08:45:41 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-11-19 08:45:41 -0500 |
commit | 26539ec3ae01a33f0ab4ce59fa83355ebdf32470 (patch) | |
tree | b17b892bb568d3f9f311edc298fd7ec2d1b8fc82 /scripts/test | |
parent | 48b08f0592734085d88b7546e39d42f6606026d6 (diff) | |
parent | 8cb817cc5e0cc36cc0218da53bc4c1f277ccd8cc (diff) | |
download | tor-26539ec3ae01a33f0ab4ce59fa83355ebdf32470.tar.gz tor-26539ec3ae01a33f0ab4ce59fa83355ebdf32470.zip |
Merge remote-tracking branch 'tor-github/pr/518'
Diffstat (limited to 'scripts/test')
-rwxr-xr-x | scripts/test/coverage | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/test/coverage b/scripts/test/coverage index 59d468ee1e..7a417cdc89 100755 --- a/scripts/test/coverage +++ b/scripts/test/coverage @@ -8,30 +8,30 @@ 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$//;'` + 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=$(echo "${DN}"/src_*-"${F}".o) ONS_WILDCARD_LITERAL="${DN}/src_*-${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 [ -d "$dst" ] then - mv $GC $dst/$GC + mv "$GC" "$dst"/"$GC" fi else echo "gcov -o $on $fn didn't make a .gcov file" |