2013-07-09 18:54:39 +02:00
|
|
|
#!/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"
|
|
|
|
|
2018-11-11 18:18:49 +01:00
|
|
|
for B in "$DIRB"/*; do
|
|
|
|
A=$DIRA/$(basename "$B")
|
|
|
|
if [ -f "$A" ]; then
|
2018-05-15 00:04:10 +02:00
|
|
|
perl -pe 's/^\s*\!*\d+(\*?):/ 1$1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$A" > "$A.tmp"
|
2017-09-28 14:53:16 +02:00
|
|
|
else
|
|
|
|
cat /dev/null > "$A.tmp"
|
|
|
|
fi
|
2018-05-15 00:04:10 +02:00
|
|
|
perl -pe 's/^\s*\!*\d+(\*?):/ 1$1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$B" > "$B.tmp"
|
|
|
|
diff -u "$A.tmp" "$B.tmp" |perl -pe 's/^((?:\+\+\+|---)(?:.*tmp))\s+.*/$1/;'
|
2019-02-08 17:22:55 +01:00
|
|
|
rm -f "$A.tmp" "$B.tmp"
|
2013-07-09 18:54:39 +02:00
|
|
|
done
|