Skip to content
Snippets Groups Projects
Commit d1059a93 authored by Andrea Shepard's avatar Andrea Shepard
Browse files

Add optional target directory parameter to coverage script and add reset-gcov target to Makefile.am

parent 55f5caf0
No related branches found
No related tags found
No related merge requests found
...@@ -71,6 +71,9 @@ test: all ...@@ -71,6 +71,9 @@ test: all
test-network: all test-network: all
./src/test/test-network.sh ./src/test/test-network.sh
reset-gcov:
rm -f src/*/*.gcda
# Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c, # Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
# eventdns.[hc], tinytest*.[ch] # eventdns.[hc], tinytest*.[ch]
check-spaces: check-spaces:
......
o Minor bugfixes:
- Added optional parameter to contrib/coverage script to specify directory
to put gcov files in, and added reset-gcov target to top-level makefile.
Fixes bug #9267.
...@@ -5,9 +5,16 @@ ...@@ -5,9 +5,16 @@
# coverage -- run gcov on the appropriate set of object files to extract # coverage -- run gcov on the appropriate set of object files to extract
# coverage information. # coverage information.
dst=$1
for fn in src/or/*.c src/common/*.c; do for fn in src/or/*.c src/common/*.c; do
BN=`basename $fn` BN=`basename $fn`
DN=`dirname $fn` DN=`dirname $fn`
F=`echo $BN | sed -e 's/\.c$//;'` F=`echo $BN | sed -e 's/\.c$//;'`
GC="${BN}.gcov"
gcov -o $DN/src_*$F.o $fn gcov -o $DN/src_*$F.o $fn
if [ -n $dst ]
then
mv $GC $dst/$GC
fi
done done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment