zeek/testing/external/scripts/diff-all
Robin Sommer 3d2dc5f5fc Merge remote-tracking branch 'origin/topic/script-reference'
* origin/topic/script-reference: (50 commits)
  A few updates for the FAQ.
  Fixing some doc warnings.
  Forgot to add protocol identifier support for TLS 1.2
  Finished SSL & syslog autodocs.
  Adding the draft SSL extension type next_protocol_negotiation.
  Fix some documentation errors.
  Tweaks.
  A set of script-reference polishing.
  fixed a couple typos in comments
  Add summary documentation to bif files.
  Add ssl and syslog script documentation
  Add Conn and DNS protocol script documentation. (fixes #731)
  Small updates to the default local.bro.
  Documentation updates for HTTP & IRC scripts.
  SSH&FTP Documentation updates.
  Fixing a warning from the documentation generation.
  This completes framework documentation package 4.
  Minor notice documentation tweaks.
  Fix some malformed Broxygen xref roles.
  Minor doc tweaks to init-bare.bro.
  ...

Conflicts:
	aux/broccoli
	aux/broctl
	src/bro.bif
	src/strings.bif

Includes:

    - Updated baselines for autodoc tests.
    - Now excluding stats.bro from external texts, it's not stable.
2012-01-10 14:00:44 -08:00

45 lines
1.2 KiB
Bash
Executable file

#! /usr/bin/env bash
#
# Runs btest-diff on $@ and fails if any fails. If $@ contains globs, we expand
# them relative to *both* the current directory and the test's baseline
# directory so that we spot missing files. Note that you will need to quote
# the globals in the TEST-EXEC line as otherwise they will have been expanded relative
# to the current directory already when this scripts runs.
diag=$TEST_DIAGNOSTICS
export TEST_DIAGNOSTICS=$diag.tmp
if [ "$diag" = "" ]; then
diag=/dev/stdout
else
rm -f $diag
fi
rc=0;
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" && "$i" != "debug.log" && "$i" != "stats.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
echo "" >>$diag
cat $diag.tmp >>$diag
rc=1
fi
fi
done
exit $rc