zeek/testing/btest/policy/misc/init-default-coverage.bro
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

11 lines
765 B
Text

# Makes sure that all base/* scripts are loaded by default via init-default.bro;
# and that all scripts loaded there in there actually exist.
@TEST-EXEC: test -d $DIST/scripts/base
@TEST-EXEC: test -e $DIST/scripts/base/init-default.bro
@TEST-EXEC: ( cd $DIST/scripts/base && find . -name '*.bro' ) | sort >"all scripts found"
@TEST-EXEC: bro misc/loaded-scripts
@TEST-EXEC: cat loaded_scripts.log | egrep -v '/build/|/loaded-scripts.bro' | awk 'NR>1{print $2}' | sed 's#/./#/#g' >loaded_scripts.log.tmp
@TEST-EXEC: cat loaded_scripts.log.tmp | sed -e ':a' -e '$!N' -e 's/^\(.*\).*\n\1.*/\1/' -e 'ta' >prefix
@TEST-EXEC: cat loaded_scripts.log.tmp | sed "s#`cat prefix`#./#g" | sort >init-default.bro
@TEST-EXEC: diff -u "all scripts found" init-default.bro 1>&2