zeek/testing/scripts/doc/example-diff-canonifier.py
Robin Sommer c738701ffd Cleaning up some testing stuff.
- The Makefiles now run btest with "-f diag.log" so that diangnostics
  output will always be written into that file.

- Makefiles now hardcode path to btest to avoid picking up the wrong version
  if in PATH.

- The canonifier scripts now live in testing/scripts, and they are
  used from both btest/ and external/.

- There's a new diff-remove-uids scripts that removed connection UIDs
  for diffing. The external/* tests now use that by default.

- Timestamp removal now has its own script: diff-remove-timestamps.
  diff-canonifier calls that.

- All Makefile have a "brief" target that runs btest with -b.

- The higher-level directories have Makefile to call the subdirs.
2011-07-05 18:47:08 -07:00

15 lines
388 B
Python
Executable file

#!/usr/bin/python
import sys
import re
# MutableVal derivatives (e.g. sets/tables) don't always generate the same
# ordering in the reST documentation, so just don't bother diffing
# the places where example.bro uses them.
RE1 = "\d*/tcp"
RE2 = "tcp port \d*"
for line in sys.stdin.readlines():
if re.search(RE1, line) is None and re.search(RE2, line) is None:
print line