mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

Updated README and collected coverage-related tests in a common dir. There are still coverage failures resulting from either the following scripts not being @load'd in the default bro mode: base/frameworks/time-machine/notice.bro base/protocols/http/partial-content.bro base/protocols/rpc/main.bro Or the following result in errors when @load'd: policy/protocols/conn/scan.bro policy/hot.conn.bro If these are all scripts-in-progress, can we move them all to live outside the main scripts/ directory until they're ready?
18 lines
1.2 KiB
Text
18 lines
1.2 KiB
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.
|
|
#
|
|
# This test will fail if a new bro script is added under the scripts/base/
|
|
# directory and it is not also added as an @load in base/init-default.bro.
|
|
# In some cases, a script in base is loaded based on the bro configuration
|
|
# (e.g. cluster operation), and in such cases, the missing_loads baseline
|
|
# can be adjusted to tolerate that.
|
|
|
|
#@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>0{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 | egrep "^-[^-]" > missing_loads
|
|
#@TEST-EXEC: btest-diff missing_loads
|