zeek/testing/btest/policy/misc/bare-loaded-scripts.test
Robin Sommer 1289e115c1 A set of new/changed tests regarding the new policy script organisation.
* test-all.bro renamed to test-all-policy.bro because it lists
      only the optional scripts now.

    * A new test that checks that the default config loads everything
      in base/*/

    * A new test that runs bare mode but loads all optional policy
      scripts (which fails horribly right now ...)

    * A new loaded_scripts test for the bare mode.
2011-08-08 18:29:35 -07:00

12 lines
666 B
Text

# This test is meant to cover whether the set of scripts that get loaded by
# default in bare mode matches a baseline of known defaults.
#
# 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 -b misc/loaded-scripts
# @TEST-EXEC: test -e loaded_scripts.log
# @TEST-EXEC: cat loaded_scripts.log | awk 'NR>1{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