Adding new policy file test-all.bro that loads all other policies.

This is for testing only. There are also two test: one that checks
that test-all.bro loads correctly, and one that ensures that test-all
is actually loading all scripts found in policy/*.
This commit is contained in:
Robin Sommer 2011-06-30 17:47:23 -07:00
parent e24d5d548c
commit b57624aabf
4 changed files with 128 additions and 0 deletions

View file

@ -0,0 +1,6 @@
# Makes sures test-all.bro (which loads *all* other scripts) compiles correctly.
#
# @TEST-EXEC: bro %INPUT >output
# @TEST-EXEC: btest-diff output
@load test-all

View file

@ -0,0 +1,6 @@
# Makes sure that all policy scripts are loading in testing.bro; and that all
# scripts loaded there actually exist.
@TEST-EXEC: ( cd $DIST/policy && find . -name '*.bro' ) | sort >"all scripts found"
@TEST-EXEC: cat $DIST/policy/test-all.bro | grep '@load' | sed 'sm^\( *# *\)\{0,\}@load *m./mg' | sort >test-all.bro
@TEST-EXEC: diff -u "all scripts found" test-all.bro 1>&2