cov-diff 488 B

1234567891011121314151617
  1. #!/bin/sh
  2. # Copyright 2013 The Tor Project, Inc.
  3. # See LICENSE for licensing information.
  4. # cov-diff -- compare two directories full of gcov files.
  5. DIRA="$1"
  6. DIRB="$2"
  7. for A in $DIRA/*; do
  8. B=$DIRB/`basename $A`
  9. perl -pe 's/^\s*\d+:/ 1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$A" > "$A.tmp"
  10. perl -pe 's/^\s*\d+:/ 1:/; s/^([^:]+:)[\d\s]+:/$1/; s/^ *-:(Runs|Programs):.*//;' "$B" > "$B.tmp"
  11. diff -u "$A.tmp" "$B.tmp"
  12. rm "$A.tmp" "$B.tmp"
  13. done