zeek/testing/btest/spicy/export-enum.zeek
Benjamin Bannier 8049d3a002 Speed up Spicy-related tests.
This patch changes invocations of `spicyz` and similar Spicy tools in
tests which perform compilation to use debug mode via passing `-d`. This
in turn leads to Spicy compiling generated C++ code in debug as opposed
to release mode which typically seems to require less CPU time and RAM.
For a local test running with `btest -j 16` and no caching via
`HILTI_CXX_COMPILER_LAUNCER` this sped up running of BTests under
`spicy/` by about 40s on my machine (120s vs 160s).
2023-05-25 14:59:10 +02:00

31 lines
590 B
Text

# @TEST-REQUIRES: have-spicy
#
# @TEST-EXEC: spicyz -d -o x.hlto tupleenum.spicy ./tupleenum.evt
# @TEST-EXEC: zeek -r ${TRACES}/ssh/single-conn.trace x.hlto %INPUT >>output
# @TEST-EXEC: zeek -NN x.hlto | grep TestEnum >>output
#
# @TEST-EXEC: btest-diff output
event zeek_init() {
local i: TupleEnum::TestEnum;
i = TupleEnum::TestEnum_A;
print i;
i = TupleEnum::TestEnum_Undef;
print i;
}
# @TEST-START-FILE tupleenum.evt
# @TEST-END-FILE
# @TEST-START-FILE tupleenum.spicy
module TupleEnum;
public type TestEnum = enum {
A = 83, B = 84, C = 85
};
# @TEST-END-FILE