diff --git a/CHANGES b/CHANGES index 3362dfc0c2..80122962ff 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,11 @@ -2.2 | 2013-11-07 01:22:05 -0800 +2.2 | 2013-11-07 02:18:11 -0800 * Release 2.2. + * Removing location information from ssh.log in external tests. + (Robin Sommer) + 2.2-beta-199 | 2013-11-07 00:36:46 -0800 * Fixing warnings during doc build. (Robin Sommer) diff --git a/testing/scripts/diff-canonifier-external b/testing/scripts/diff-canonifier-external index 37a51fa72f..aabe9218e6 100755 --- a/testing/scripts/diff-canonifier-external +++ b/testing/scripts/diff-canonifier-external @@ -8,6 +8,10 @@ if [ "$1" == "capture_loss.log" ]; then addl="`dirname $0`/diff-remove-fractions" fi +if [ "$1" == "ssh.log" ]; then + addl="`dirname $0`/diff-remove-fields remote_location" +fi + `dirname $0`/diff-remove-timestamps \ | `dirname $0`/diff-remove-uids \ | `dirname $0`/diff-remove-file-ids \ diff --git a/testing/scripts/diff-remove-fields b/testing/scripts/diff-remove-fields new file mode 100755 index 0000000000..7f18748a5f --- /dev/null +++ b/testing/scripts/diff-remove-fields @@ -0,0 +1,34 @@ +#! /usr/bin/env bash +# +# A diff canonifier that removes all fields starting with a given +# prefix. + +if [ $# != 1 ]; then + echo "usage: `basename $0` " + exit 1 +fi + +awk -v "PREFIX=$1" ' + +BEGIN { FS="\t"; OFS="\t"; } + +/^#fields/ { + for ( i = 2; i <= NF; ++i ) + { + if ( index($i, PREFIX) == 1 ) + rem[i-1] = 1; + } + print; + next; +} + +{ + for ( i in rem ) + # Mark that it iss set, but ignore content. + $i = "+"; + + print; +} + +' +