btests for new --optimize-funcs and --optimize-files

This commit is contained in:
Vern Paxson 2021-12-10 13:02:52 -08:00
parent 267f5461d8
commit a0e7feda6f
18 changed files with 198 additions and 0 deletions

View file

@ -0,0 +1,22 @@
# @TEST-EXEC: zeek -b -O ZAM --optimize-func='my_test' %INPUT >output
# @TEST-EXEC: btest-diff output
# Tests that we can selectively a given function.
function my_test()
{
print "I should be ZAM code!";
}
function another_test()
{
print "I shouldn't be ZAM code!";
}
event zeek_init()
{
my_test();
another_test();
print my_test;
print another_test;
}