]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add optional target directory parameter to coverage script and add reset-gcov target...
authorAndrea Shepard <andrea@torproject.org>
Tue, 16 Jul 2013 05:33:39 +0000 (22:33 -0700)
committerAndrea Shepard <andrea@torproject.org>
Tue, 16 Jul 2013 05:33:39 +0000 (22:33 -0700)
Makefile.am
changes/bug9267 [new file with mode: 0644]
contrib/coverage

index 1bc1077ebb84e5609a66b1e91cf6fad55b275c81..0361d87cec22cfc942d7cb50ad3ee81b9ad47346 100644 (file)
@@ -71,6 +71,9 @@ test: all
 test-network: all
        ./src/test/test-network.sh
 
+reset-gcov:
+       rm -f src/*/*.gcda
+
 # Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
 # eventdns.[hc], tinytest*.[ch]
 check-spaces:
diff --git a/changes/bug9267 b/changes/bug9267
new file mode 100644 (file)
index 0000000..95a6211
--- /dev/null
@@ -0,0 +1,4 @@
+  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.
index f51649a78ecc6c8fefb2e3290381de04e3cef6af..8d971660c9a15878f0ef18a7bfb158b005a0c336 100755 (executable)
@@ -5,9 +5,16 @@
 # coverage -- run gcov on the appropriate set of object files to extract
 # coverage information.
 
+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$//;'`
+    GC="${BN}.gcov"
     gcov -o $DN/src_*$F.o $fn
+    if [ -n $dst ]
+    then
+      mv $GC $dst/$GC
+    fi
 done