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

When Bro was compiled with broker disabled, then some Bro scripts were referencing functions and types that were not defined. Fixed by adding @ifdefs to several scripts. Removed one @ifdef because it was causing several unit tests to fail. Also fixed the @TEST-REQUIRES check in tests that rely on broker so that such tests are skipped when broker is disabled.
19 lines
384 B
Text
19 lines
384 B
Text
# @TEST-REQUIRES: grep -q ENABLE_BROKER:BOOL=true $BUILD/CMakeCache.txt
|
|
|
|
# @TEST-EXEC: bro -b %INPUT >output
|
|
# @TEST-EXEC: btest-diff output
|
|
|
|
redef exit_only_after_terminate = T;
|
|
|
|
event terminate_me() {
|
|
print "terminating";
|
|
terminate();
|
|
}
|
|
|
|
event bro_init() {
|
|
Broker::enable();
|
|
|
|
print "1";
|
|
schedule 1sec { terminate_me() };
|
|
print "2";
|
|
}
|