summaryrefslogtreecommitdiff
path: root/scripts/test/cov-diff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-04-12 21:12:10 -0400
committerNick Mathewson <nickm@torproject.org>2016-04-12 21:12:10 -0400
commit4043f2c95f4a47e69edc4d451673b7ffda066768 (patch)
tree31e26cf0e4e2d05ab75909d404b5c589896cacc5 /scripts/test/cov-diff
parentbd34edc18d6e21f5ba7bddf5a7ebe6582e8dc639 (diff)
downloadtor-4043f2c95f4a47e69edc4d451673b7ffda066768.tar.gz
tor-4043f2c95f4a47e69edc4d451673b7ffda066768.zip
Adopt the LCOV convention for marking lines as unreachable by tests.
Document this convention. Add a script to post-process .gcov files in order to stop nagging us about excluded lines. Teach cov-diff to handle these post-processed files. Closes ticket 16792
Diffstat (limited to 'scripts/test/cov-diff')
-rwxr-xr-xscripts/test/cov-diff4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/test/cov-diff b/scripts/test/cov-diff
index 48dbec9d54..7da7f0be9d 100755
--- a/scripts/test/cov-diff
+++ b/scripts/test/cov-diff
@@ -9,8 +9,8 @@ DIRB="$2"
for A in $DIRA/*; do
B=$DIRB/`basename $A`
- perl -pe 's/^\s*\d+:/ 1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$A" > "$A.tmp"
- perl -pe 's/^\s*\d+:/ 1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$B" > "$B.tmp"
+ perl -pe 's/^\s*\!*\d+:/ 1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$A" > "$A.tmp"
+ 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