mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
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:
parent
e24d5d548c
commit
b57624aabf
4 changed files with 128 additions and 0 deletions
0
testing/btest/Baseline/policy.misc.check-test-all/output
Normal file
0
testing/btest/Baseline/policy.misc.check-test-all/output
Normal file
6
testing/btest/policy/misc/check-test-all.bro
Normal file
6
testing/btest/policy/misc/check-test-all.bro
Normal 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
|
6
testing/btest/policy/misc/testing-coverage.bro
Normal file
6
testing/btest/policy/misc/testing-coverage.bro
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue