zeek/testing/btest/coverage/default-load-baseline.test
Jon Siwek a71ab223c4 Various unit test cleanup.
Updated README and collected coverage-related tests in a common dir.

There are still coverage failures resulting from either the following
scripts not being @load'd in the default bro mode:

base/frameworks/time-machine/notice.bro
base/protocols/http/partial-content.bro
base/protocols/rpc/main.bro

Or the following result in errors when @load'd:

policy/protocols/conn/scan.bro
policy/hot.conn.bro

If these are all scripts-in-progress, can we move them all to live
outside the main scripts/ directory until they're ready?
2011-09-27 12:41:30 -05:00

14 lines
780 B
Text

# This test is meant to cover whether the set of scripts that get loaded by
# default matches a baseline of known defaults. When new scripts are
# added to the scripts/base/ directory, the baseline will usually just need
# to be updated.
#
# As the output has absolute paths in it, we need to remove the common
# prefix to make the test work everywhere. That's what the sed magic
# below does. Don't ask. :-)
# @TEST-EXEC: bro misc/loaded-scripts
# @TEST-EXEC: test -e loaded_scripts.log
# @TEST-EXEC: cat loaded_scripts.log | egrep -v '#' | awk 'NR>0{print $2}' | sed -e ':a' -e '$!N' -e 's/^\(.*\).*\n\1.*/\1/' -e 'ta' >prefix
# @TEST-EXEC: cat loaded_scripts.log | sed "s#`cat prefix`##g" >canonified_loaded_scripts.log
# @TEST-EXEC: btest-diff canonified_loaded_scripts.log