Ignoring file ids in external tests.

They can change occasionally, and we likewise ignore uids already.
This commit is contained in:
Robin Sommer 2013-06-04 21:19:08 -07:00
parent da3eb2d3e2
commit 74e99a27db
4 changed files with 46 additions and 1 deletions

View file

@ -4,6 +4,7 @@
`dirname $0`/diff-remove-timestamps \
| `dirname $0`/diff-remove-uids \
| `dirname $0`/diff-remove-file-ids \
| `dirname $0`/diff-remove-x509-names \
| `dirname $0`/diff-canon-notice-policy \
| `dirname $0`/diff-sort

View file

@ -0,0 +1,33 @@
#! /usr/bin/awk -f
#
# A diff canonifier that removes all file IDs from file_analysis.log
BEGIN {
FS="\t";
OFS="\t";
process = 0;
}
$1 == "#path" && $2 == "file_analysis" {
process = 1;
}
process && column1 > 0 && column2 > 0 {
$column1 = "XXXXXXXXXXX";
$column2 = "XXXXXXXXXXX";
}
/^#/ {
for ( i = 0; i < NF; ++i ) {
if ( $i == "id" )
column1 = i - 1;
if ( $i == "parent_id" )
column2 = i - 1;
}
}
{ print }