aboutsummaryrefslogtreecommitdiff
path: root/scripts/test/cov-diff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/test/cov-diff')
-rwxr-xr-xscripts/test/cov-diff14
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/test/cov-diff b/scripts/test/cov-diff
index 7da7f0be9d..6179dff63e 100755
--- a/scripts/test/cov-diff
+++ b/scripts/test/cov-diff
@@ -7,11 +7,15 @@
DIRA="$1"
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"
- diff -u "$A.tmp" "$B.tmp"
+for B in $DIRB/*; do
+ A=$DIRA/`basename $B`
+ if [ -f $A ]; then
+ 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$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