mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Adding a loaded-scripts test for the bare mode.
This commit is contained in:
parent
e9f7d82ac2
commit
f506b5682f
2 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
# depth name
|
||||
0 scripts/base/init-bare.bro
|
||||
1 build/src/const.bif.bro
|
||||
1 build/src/types.bif.bro
|
||||
1 build/src/strings.bif.bro
|
||||
1 build/src/bro.bif.bro
|
||||
1 build/src/reporter.bif.bro
|
||||
1 build/src/event.bif.bro
|
||||
1 scripts/base/frameworks/logging/__load__.bro
|
||||
2 scripts/base/frameworks/logging/./main.bro
|
||||
3 build/src/logging.bif.bro
|
||||
2 scripts/base/frameworks/logging/./writers/ascii.bro
|
||||
0 scripts/policy/misc/loaded-scripts.bro
|
12
testing/btest/policy/misc/default-loaded-scripts-bare.test
Normal file
12
testing/btest/policy/misc/default-loaded-scripts-bare.test
Normal file
|
@ -0,0 +1,12 @@
|
|||
# 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
|
Loading…
Add table
Add a link
Reference in a new issue