mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

zeek.on('zeek_init', () => { console.log('Hello, Zeek!'); }); For interaction with external systems and HTTP APIs, JavaScript and the Node.js ecosystem beat Zeek script. Make it more easily accessible by including ZeekJS with Zeek directly. When a recent enough libnode version is found on the build system, ZeekJS is added as a builtin plugin. This behavior can be disabled via ``--disable-javascript``. Linux distributions providing such a package are Ubuntu (22.10) and Debian (testing/bookworm) as libnode-dev. Fedora provides it as nodejs-devel. This plugin takes over loading of .js or .cjs files. When no such files are provided to Zeek, Node and the V8 engine are not initialized and should not get into the way. This should be considered experimental.
101 lines
3.8 KiB
INI
101 lines
3.8 KiB
INI
[DEFAULT]
|
|
# This should be a path relative to the main repository directory, and
|
|
# can be overridden with btest's -s command-line argument.
|
|
build_dir = build
|
|
|
|
[btest]
|
|
TestDirs = doc bifs language core scripts coverage signatures plugins broker spicy supervisor telemetry javascript
|
|
TmpDir = %(testbase)s/.tmp
|
|
BaselineDir = %(testbase)s/Baseline
|
|
IgnoreDirs = .svn CVS .tmp
|
|
IgnoreFiles = *.tmp *.swp .clang-format #* *.trace .DS_Store
|
|
MinVersion = 0.63
|
|
|
|
[environment]
|
|
ZEEKPATH=`bash -c %(testbase)s/../../%(build_dir)s/zeek-path-dev`
|
|
ZEEK_SEED_FILE=%(testbase)s/random.seed
|
|
ZEEK_PLUGIN_PATH=
|
|
TZ=UTC
|
|
LC_ALL=C
|
|
BTEST_PATH=%(testbase)s/../../auxil/btest
|
|
PATH=%(testbase)s/../../%(build_dir)s/src%(pathsep)s%(testbase)s/../scripts%(pathsep)s%(testbase)s/../../auxil/btest%(pathsep)s%(testbase)s/../../%(build_dir)s/auxil/zeek-aux/zeek-cut%(pathsep)s%(testbase)s/../../auxil/btest/sphinx%(pathsep)s%(default_path)s%(pathsep)s/sbin
|
|
TRACES=%(testbase)s/Traces
|
|
FILES=%(testbase)s/Files
|
|
SCRIPTS=%(testbase)s/../scripts
|
|
DOC_ROOT=%(testbase)s/../../doc
|
|
DIST=%(testbase)s/../..
|
|
BUILD=%(testbase)s/../../%(build_dir)s
|
|
TEST_DIFF_CANONIFIER=%(testbase)s/../scripts/diff-canonifier
|
|
TMPDIR=%(testbase)s/.tmp
|
|
ZEEK_PROFILER_FILE=%(testbase)s/.tmp/script-coverage/XXXXXX
|
|
BTEST_RST_FILTER=$SCRIPTS/rst-filter
|
|
ZEEK_DNS_FAKE=1
|
|
ZEEK_DEFAULT_LISTEN_ADDRESS=127.0.0.1
|
|
ZEEK_DEFAULT_LISTEN_RETRY=1
|
|
ZEEK_DEFAULT_CONNECT_RETRY=1
|
|
ZEEK_DISABLE_ZEEKYGEN=1
|
|
ZEEK_ALLOW_INIT_ERRORS=1
|
|
ZEEK_SUPERVISOR_NO_SIGKILL=1
|
|
UBSAN_OPTIONS=print_stacktrace=1
|
|
SPICY_PATH=`bash -c %(testbase)s/../../%(build_dir)s/spicy-path`
|
|
HILTI_CXX_INCLUDE_DIRS=`bash -c %(testbase)s/../../%(build_dir)s/hilti-cxx-include-dirs`
|
|
|
|
[environment-AST-dup]
|
|
# Environment for testing AST duplication functionality, which is
|
|
# needed for script optimization but isn't otherwise exercised.
|
|
#
|
|
# 5 tests differ, for the following reasons:
|
|
#
|
|
# language.deprecated
|
|
# Some deprecation messages get reported multiple times, first when
|
|
# constructing the original AST node, and then when duplicating it.
|
|
#
|
|
# scripts.base.frameworks.input.reread
|
|
# plugins.hooks
|
|
# When lambdas are duplicated they get a new UID, which differs
|
|
# from the original.
|
|
#
|
|
# coverage.zeek-profiler-file
|
|
# Not sure what's going on here, but best guess the problem is
|
|
# that the coverage tracking is looking for execution of the
|
|
# original statements and is not able to associate the duplicated
|
|
# statements with these. Doesn't seem worth trying to fix.
|
|
#
|
|
ZEEK_DUPLICATE_ASTS=1
|
|
BTEST_BASELINE_DIR=%(testbase)s/Baseline.dup:%(testbase)s/Baseline
|
|
|
|
[environment-inline]
|
|
ZEEK_INLINE=1
|
|
BTEST_BASELINE_DIR=%(testbase)s/Baseline.inline:%(testbase)s/Baseline
|
|
|
|
[environment-xform]
|
|
ZEEK_XFORM=1
|
|
BTEST_BASELINE_DIR=%(testbase)s/Baseline.xform:%(testbase)s/Baseline
|
|
|
|
[environment-opt]
|
|
ZEEK_XFORM=1
|
|
ZEEK_OPT=1
|
|
BTEST_BASELINE_DIR=%(testbase)s/Baseline.opt:%(testbase)s/Baseline.xform:%(testbase)s/Baseline
|
|
|
|
# The following is used for testing -u functionality. We set $ZEEK_XFORM,
|
|
# too, because the analysis is done on transformed ASTs, and some tests
|
|
# might be sensitive to that fact. For the same reason, we first fall
|
|
# back to Baseline.xform.
|
|
[environment-usage]
|
|
ZEEK_XFORM=1
|
|
ZEEK_USAGE_ISSUES=1
|
|
BTEST_BASELINE_DIR=%(testbase)s/Baseline.usage:%(testbase)s/Baseline.xform:%(testbase)s/Baseline
|
|
|
|
[environment-cpp]
|
|
ZEEK_USE_CPP=1
|
|
BTEST_BASELINE_DIR=%(testbase)s/Baseline.cpp:%(testbase)s/Baseline
|
|
|
|
# This environment runs ZAM in default mode, i.e., with all optimizations
|
|
# activated. When using it, some of the tests require extra time to run,
|
|
# so before diagnosing failures, rerun the failed tests non-parallelized
|
|
# (no -j). Also, we explicitly set ZEEK_XFORM, even though ZEEK_ZAM activates
|
|
# it, because some tests look for it when deciding whether to skip or run.
|
|
[environment-zam]
|
|
ZEEK_ZAM=1
|
|
ZEEK_XFORM=1
|
|
BTEST_BASELINE_DIR=%(testbase)s/Baseline.zam:%(testbase)s/Baseline.xform:%(testbase)s/Baseline
|