BTests & baselines for testing selective skipping of script optimization

This commit is contained in:
Vern Paxson 2025-09-12 11:05:55 -06:00 committed by Tim Wojtulewicz
parent 441baaf2c1
commit dc7f4dca1c
27 changed files with 246 additions and 10 deletions

View file

@ -0,0 +1,19 @@
# @TEST-REQUIRES: test "${ZEEK_USE_CPP}" != "1"
# @TEST-EXEC: zeek -b -O ZAM --no-optimize-func=my_test %INPUT >out1
# @TEST-EXEC: zeek -b -O ZAM --no-optimize-func=my_test --optimize-func=my_test %INPUT --optimize-func=zeek_init >out2
# @TEST-EXEC: btest-diff out1
# @TEST-EXEC: btest-diff out2
# The first test checks that we can selectively exclude a function.
# The second tests that skipping overrides including.
function my_test()
{
print "I shouldn't be ZAM code!";
}
event zeek_init()
{
my_test();
print my_test;
}