[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    = af_packet doc bifs language core scripts coverage signatures plugins broker spicy supervisor telemetry javascript misc opt dns_mgr cluster
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`
HILTI_CXX_COMPILER_LAUNCHER=`f=%(testbase)s/../../%(build_dir)s/CMakeCache.txt && grep -q '^ENABLE_CCACHE:BOOL=true' $f && sed -n 's/^CCACHE_PROGRAM:FILEPATH=\(.*\)$/\1/p' $f`
HILTI_JIT_PARALLELISM=`bash -c 'echo ${HILTI_JIT_PARALLELISM:-1}'`
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/../../%(build_dir)s/auxil/spicy/bin%(pathsep)s%(testbase)s/../../%(build_dir)s/src/spicy/spicyz%(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
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`
ZEEK_SPICY_MODULE_PATH=/does/not/exist
ZEEK_SPICY_LIBRARY_PATH=%(testbase)s/../../scripts/spicy

[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).
[environment-zam]
ZEEK_ZAM=1
ZEEK_ZAM_KEEP_ASSERTS=1
BTEST_BASELINE_DIR=%(testbase)s/Baseline.zam:%(testbase)s/Baseline
