diff options
Diffstat (limited to 'scripts/test/cov-diff')
-rwxr-xr-x | scripts/test/cov-diff | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/test/cov-diff b/scripts/test/cov-diff new file mode 100755 index 000000000..33a54802b --- /dev/null +++ b/scripts/test/cov-diff @@ -0,0 +1,17 @@ +#!/bin/sh +# Copyright 2013 The Tor Project, Inc. +# See LICENSE for licensing information. + +# cov-diff -- compare two directories full of gcov files. + +DIRA="$1" +DIRB="$2" + +for A in $DIRA/*; do + B=$DIRB/`basename $A` + perl -pe 's/^\s*\d+:/ 1:/; s/^([^:]+:)[\d\s]+:/$1/;' "$A" > "$A.tmp" + perl -pe 's/^\s*\d+:/ 1:/; s/^([^:]+:)[\d\s]+:/$1/;' "$B" > "$B.tmp" + diff -u "$A.tmp" "$B.tmp" + rm "$A.tmp" "$B.tmp" +done + |