mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Add a script to compare directories full of gcov output
We can't just use "diff", since we don't care about changes in line numbers, or changes in the exact number of times a line was called. We just care about changes that make lines covered or non-coverd. So pre-process the files before calling diff.
This commit is contained in:
parent
17e9fc09c3
commit
4753ad4f1d
17
contrib/cov-diff
Executable file
17
contrib/cov-diff
Executable file
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user