mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00

This also installs symlinks from "zeek" and "bro-config" to a wrapper script that prints a deprecation warning. The btests pass, but this is still WIP. broctl renaming is still missing. #239
32 lines
562 B
Text
32 lines
562 B
Text
# @TEST-EXEC: btest-bg-run zeek zeek %INPUT
|
|
# @TEST-EXEC: btest-bg-wait 20
|
|
# @TEST-EXEC: btest-diff zeek/weird_stats.log
|
|
|
|
@load misc/weird-stats
|
|
|
|
redef exit_only_after_terminate = T;
|
|
redef WeirdStats::weird_stat_interval = 5sec;
|
|
|
|
event die()
|
|
{
|
|
terminate();
|
|
}
|
|
|
|
event gen_weirds(n: count, done: bool &default = F)
|
|
{
|
|
while ( n != 0 )
|
|
{
|
|
Reporter::net_weird("my_weird");
|
|
--n;
|
|
}
|
|
|
|
if ( done )
|
|
schedule 5sec { die() };
|
|
}
|
|
|
|
event zeek_init()
|
|
{
|
|
event gen_weirds(1000);
|
|
schedule 7.5sec { gen_weirds(2000) } ;
|
|
schedule 12.5sec { gen_weirds(10, T) } ;
|
|
}
|