[btest]
TestDirs    = doc bifs language core scripts coverage signatures plugins broker spicy supervisor telemetry
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/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/src:%(testbase)s/../scripts:%(testbase)s/../../auxil/btest:%(testbase)s/../../build/auxil/zeek-aux/zeek-cut:%(testbase)s/../../auxil/btest/sphinx:%(default_path)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
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/spicy-path`
HILTI_CXX_INCLUDE_DIRS=`bash -c %(testbase)s/../../build/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
