mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-11 05:03:34 +01:00
22 lines
562 B
Bash
Executable File
22 lines
562 B
Bash
Executable File
#!/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 B in $DIRB/*; do
|
|
A=$DIRA/`basename $B`
|
|
if [ -f $A ]; then
|
|
perl -pe 's/^\s*\!*\d+:/ 1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$A" > "$A.tmp"
|
|
else
|
|
cat /dev/null > "$A.tmp"
|
|
fi
|
|
perl -pe 's/^\s*\!*\d+:/ 1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$B" > "$B.tmp"
|
|
diff -u "$A.tmp" "$B.tmp"
|
|
rm "$A.tmp" "$B.tmp"
|
|
done
|
|
|