mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-20 10:12:15 +01:00
Update cov-diff to handle new gcov, and remove timestamps
The new gcov sometimes emits *s if there is a line containing multiple basic blocks, and some are not executed. (The gcov documentation says something weird about this point, so I'm trying to interpret it into the compilerese that I'm familiar with.) That's bug 26101. Also, when we're looking for unique variations in our coverage, we would like cov-diff to suppress timestamps on the diffs. That's bug 26102. Both of these are bugfixes on 0.2.5.1-alpha when the cov-diff script was introduced. My apologies for the perl.
This commit is contained in:
parent
aab626405c
commit
db94d7fed2
5
changes/bug26101_26102
Normal file
5
changes/bug26101_26102
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor bugfixes (test coverage tools):
|
||||
- Update our "cov-diff" script to handle output from the latest
|
||||
version of gcov, and to remove extraneous timestamp information
|
||||
from its output. Fixes bugs 26101 and 26102; bugfix on
|
||||
0.2.5.1-alpha.
|
@ -10,12 +10,12 @@ 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"
|
||||
perl -pe 's/^\s*\!*\d+(\*?):/ 1$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"
|
||||
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/;'
|
||||
rm "$A.tmp" "$B.tmp"
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user