mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Minor fixes to external test process. (addresses #298)
- Skip diffing of debug.log always. - Skip diffing of reporter.log if it only contains an error about missing GeoIP support. - Canonicalize X.509 Distinguished Name subjects since that can vary depending on installed OpenSSL version.
This commit is contained in:
parent
eeceb14c1a
commit
ff1768f857
3 changed files with 43 additions and 1 deletions
11
testing/external/scripts/diff-all
vendored
11
testing/external/scripts/diff-all
vendored
|
@ -22,7 +22,16 @@ files_cwd=`ls $@`
|
|||
files_baseline=`cd $TEST_BASELINE && ls $@`
|
||||
|
||||
for i in `echo $files_cwd $files_baseline | sort | uniq`; do
|
||||
if [[ "$i" != "loaded_scripts.log" && "$i" != "prof.log" ]]; then
|
||||
if [[ "$i" != "loaded_scripts.log" && "$i" != "prof.log" && "$i" != "debug.log" ]]; then
|
||||
|
||||
if [[ "$i" == "reporter.log" ]]; then
|
||||
# Do not diff the reporter.log if it only complains about missing
|
||||
# GeoIP support.
|
||||
if ! egrep -v "^#|Bro was not configured for GeoIP support" $i; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! btest-diff $i; then
|
||||
echo "" >>$diag
|
||||
echo "#### btest-diff $i" >>$diag
|
||||
|
|
|
@ -5,3 +5,4 @@
|
|||
`dirname $0`/diff-remove-timestamps \
|
||||
| `dirname $0`/diff-remove-uids \
|
||||
| `dirname $0`/diff-remove-mime-types \
|
||||
| `dirname $0`/diff-remove-x509-names \
|
||||
|
|
32
testing/scripts/diff-remove-x509-names
Executable file
32
testing/scripts/diff-remove-x509-names
Executable file
|
@ -0,0 +1,32 @@
|
|||
#! /usr/bin/awk -f
|
||||
#
|
||||
# A diff canonifier that removes all X.509 Distinguished Name subject fields
|
||||
# because that output can differ depending on installed OpenSSL version.
|
||||
|
||||
BEGIN { FS="\t"; OFS="\t"; s_col = -1; i_col = -1 }
|
||||
|
||||
/^#fields/ {
|
||||
for ( i = 2; i < NF; ++i )
|
||||
{
|
||||
if ( $i == "subject" )
|
||||
s_col = i-1;
|
||||
if ( $i == "issuer_subject" )
|
||||
i_col = i-1;
|
||||
}
|
||||
}
|
||||
|
||||
s_col >= 0 {
|
||||
if ( $s_col != "-" )
|
||||
# Mark that it's set, but ignore content.
|
||||
$s_col = "+";
|
||||
}
|
||||
|
||||
i_col >= 0 {
|
||||
if ( $i_col != "-" )
|
||||
# Mark that it's set, but ignore content.
|
||||
$i_col = "+";
|
||||
}
|
||||
|
||||
{
|
||||
print;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue