mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00

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).
28 lines
652 B
Text
28 lines
652 B
Text
# @TEST-REQUIRES: have-spicy
|
|
#
|
|
# @TEST-EXEC: spicyz -d -o test.hlto %INPUT ./foo.evt
|
|
# @TEST-EXEC: zeek -Cr ${TRACES}/ssh/ssh-over-udp.pcap test.hlto
|
|
# @TEST-EXEC: btest-diff ssh.log
|
|
#
|
|
# @TEST-DOC: Pass data from inside a UDP analyzer to a Zeek analyzers that works on top of TCP. Regression tests for #92 and also #91.
|
|
#
|
|
|
|
module Foo;
|
|
|
|
import spicy;
|
|
import zeek;
|
|
|
|
public type Bar = unit {
|
|
on %init { zeek::protocol_begin("SSH"); }
|
|
data: bytes &eod { zeek::protocol_data_in(zeek::is_orig(), $$); }
|
|
};
|
|
|
|
# @TEST-START-FILE foo.evt
|
|
|
|
import zeek;
|
|
|
|
protocol analyzer spicy::Foo over UDP:
|
|
parse with Foo::Bar,
|
|
port 1234/udp;
|
|
|
|
# @TEST-END-FILE
|