diff --git a/testing/scripts/diff-canon-notice-policy b/testing/scripts/diff-canon-notice-policy deleted file mode 100755 index f05abaa103..0000000000 --- a/testing/scripts/diff-canon-notice-policy +++ /dev/null @@ -1,10 +0,0 @@ -#! /usr/bin/awk -f -# -# A diff canonifier that removes the priorities in notice_policy.log. - -/^#/ && $2 == "notice_policy" { filter = 1; } - -filter == 1 && /^[^#]/ { sub("^[0-9]*", "X"); } - -{ print; } - diff --git a/testing/scripts/diff-canonifier-external b/testing/scripts/diff-canonifier-external index ee6405b3a8..611d7c7baf 100755 --- a/testing/scripts/diff-canonifier-external +++ b/testing/scripts/diff-canonifier-external @@ -18,7 +18,6 @@ fi | `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 \ | eval $addl diff --git a/testing/scripts/diff-remove-file-ids b/testing/scripts/diff-remove-file-ids index 965a74442e..b34191f2c8 100755 --- a/testing/scripts/diff-remove-file-ids +++ b/testing/scripts/diff-remove-file-ids @@ -1,7 +1,8 @@ -#! /usr/bin/awk -f +#! /usr/bin/env bash # # A diff canonifier that removes all file IDs from files.log +awk ' BEGIN { FS="\t"; OFS="\t"; @@ -28,6 +29,4 @@ process && column1 > 0 && column2 > 0 { } { print } - - - +' diff --git a/testing/scripts/diff-remove-mime-types b/testing/scripts/diff-remove-mime-types deleted file mode 100755 index b8cc3d1e6d..0000000000 --- a/testing/scripts/diff-remove-mime-types +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/bin/awk -f -# -# A diff canonifier that removes all MIME types because libmagic output -# can differ between installations. - -BEGIN { FS="\t"; OFS="\t"; type_col = -1; desc_col = -1 } - -/^#fields/ { - for ( i = 2; i < NF; ++i ) - { - if ( $i == "mime_type" ) - type_col = i-1; - if ( $i == "mime_desc" ) - desc_col = i-1; - } -} - -function remove_mime (n) { - if ( n >= 0 && $n != "-" ) - # Mark that it's set, but ignore content. - $n = "+" -} - -remove_mime(type_col) -remove_mime(desc_col) - -{ - print; -} diff --git a/testing/scripts/diff-remove-uids b/testing/scripts/diff-remove-uids index 8e12b7abe5..3c3faae083 100755 --- a/testing/scripts/diff-remove-uids +++ b/testing/scripts/diff-remove-uids @@ -1,7 +1,8 @@ -#! /usr/bin/awk -f +#! /usr/bin/env bash # # A diff canonifier that removes all connection UIDs. +awk ' BEGIN { FS="\t"; OFS="\t"; } column > 0 { @@ -16,6 +17,4 @@ column > 0 { } { print } - - - +' diff --git a/testing/scripts/diff-remove-x509-names b/testing/scripts/diff-remove-x509-names index 4534cb7d87..d7c1fe7032 100755 --- a/testing/scripts/diff-remove-x509-names +++ b/testing/scripts/diff-remove-x509-names @@ -1,8 +1,9 @@ -#! /usr/bin/awk -f +#! /usr/bin/env bash # # A diff canonifier that removes all X.509 Distinguished Name subject fields # because that output can differ depending on installed OpenSSL version. +awk ' BEGIN { FS="\t"; OFS="\t"; s_col = -1; i_col = -1; is_col = -1; cs_col = -1; ci_col = -1; cert_subj_col = -1; cert_issuer_col = -1 } /^#fields/ { @@ -27,46 +28,47 @@ BEGIN { FS="\t"; OFS="\t"; s_col = -1; i_col = -1; is_col = -1; cs_col = -1; ci_ s_col >= 0 { if ( $s_col != "-" ) - # Mark that it's set, but ignore content. + # Mark that it is set, but ignore content. $s_col = "+"; } i_col >= 0 { if ( $i_col != "-" ) - # Mark that it's set, but ignore content. + # Mark that it is set, but ignore content. $i_col = "+"; } is_col >= 0 { if ( $is_col != "-" ) - # Mark that it's set, but ignore content. + # Mark that it is set, but ignore content. $is_col = "+"; } cs_col >= 0 { if ( $cs_col != "-" ) - # Mark that it's set, but ignore content. + # Mark that it is set, but ignore content. $cs_col = "+"; } ci_col >= 0 { if ( $ci_col != "-" ) - # Mark that it's set, but ignore content. + # Mark that it is set, but ignore content. $ci_col = "+"; } cert_subj_col >= 0 { if ( $cert_subj_col != "-" ) - # Mark that it's set, but ignore content. + # Mark that it is set, but ignore content. $cert_subj_col = "+"; } cert_issuer_col >= 0 { if ( $cert_issuer_col != "-" ) - # Mark that it's set, but ignore content. + # Mark that it is set, but ignore content. $cert_issuer_col = "+"; } { print; } +'