Remove check-tor script
[tor.git] / scripts / test / cov-diff
blobf3ca856888b2862455c5eba6e0e082a0886c6ffc
1 #!/bin/sh
2 # Copyright 2013 The Tor Project, Inc.
3 # See LICENSE for licensing information.
5 # cov-diff -- compare two directories full of gcov files.
7 DIRA="$1"
8 DIRB="$2"
10 for B in "$DIRB"/*; do
11 A=$DIRA/$(basename "$B")
12 if [ -f "$A" ]; then
13 perl -pe 's/^\s*\!*\d+(\*?):/ 1$1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$A" > "$A.tmp"
14 else
15 cat /dev/null > "$A.tmp"
17 perl -pe 's/^\s*\!*\d+(\*?):/ 1$1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$B" > "$B.tmp"
18 diff -u "$A.tmp" "$B.tmp" |perl -pe 's/^((?:\+\+\+|---)(?:.*tmp))\s+.*/$1/;'
19 rm "$A.tmp" "$B.tmp"
20 done