mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Various unit test cleanup.
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?
This commit is contained in:
parent
24bb14390b
commit
a71ab223c4
19 changed files with 119 additions and 95 deletions
11
testing/btest/coverage/bare-mode-errors.test
Normal file
11
testing/btest/coverage/bare-mode-errors.test
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Makes sure any given bro script in the scripts/ tree can be loaded in
|
||||
# bare mode without error. btest-bg-run/btest-bg-wait are used to kill off
|
||||
# scripts that block after loading, e.g. start listening on a socket.
|
||||
#
|
||||
# Commonly, this test may fail if one forgets to @load some base/ scripts
|
||||
# when writing a new bro scripts.
|
||||
#
|
||||
# @TEST-EXEC: test -d $DIST/scripts
|
||||
# @TEST-EXEC: for script in `find $DIST/scripts -name \*\.bro`; do echo $script;if [[ "$script" =~ listen-clear|listen-ssl|controllee ]]; then rm -rf load_attempt .bgprocs; btest-bg-run load_attempt bro -b $script; btest-bg-wait -k 2; cat load_attempt/.stderr >>allerrors; else bro -b $script 2>>allerrors; fi done || exit 0
|
||||
# @TEST-EXEC: cat allerrors | grep -v "received termination signal" | sort | uniq > unique_errors
|
||||
# @TEST-EXEC: btest-diff unique_errors
|
Loading…
Add table
Add a link
Reference in a new issue