From 43fec1f2c8f017a8f25e2c50f856771873bd7623 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Fri, 15 Dec 2023 15:20:30 +0100 Subject: [PATCH] ci/btest: Remove ZEEK_PROFILER_FILE from btest.cfg, set in ci/test.sh explicitly The produced coverage files are of little use in current local workflows and usually just end-up taking up disk space. ZEEK_PROFILER_FILE can be set explicitly if there's a one-off need to produce these locally, too. --- ci/test.sh | 9 ++++++--- testing/btest/btest.cfg | 1 - testing/external/subdir-btest.cfg | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ci/test.sh b/ci/test.sh index 310212ab00..c5304b4512 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -59,7 +59,8 @@ function run_btests { pushd testing/btest - ${BTEST} -z ${ZEEK_CI_BTEST_RETRIES} -d -A -x btest-results.xml -j ${ZEEK_CI_BTEST_JOBS} || result=1 + ZEEK_PROFILER_FILE=$(pwd)/.tmp/script-coverage/XXXXXX \ + ${BTEST} -z ${ZEEK_CI_BTEST_RETRIES} -d -A -x btest-results.xml -j ${ZEEK_CI_BTEST_JOBS} || result=1 make coverage prep_artifacts popd @@ -70,7 +71,8 @@ function run_external_btests { local zeek_testing_pid="" local zeek_testing_pid_private="" pushd testing/external/zeek-testing - ${BTEST} -d -A -x btest-results.xml -j ${ZEEK_CI_BTEST_JOBS} >btest.out 2>&1 & + ZEEK_PROFILER_FILE=$(pwd)/.tmp/script-coverage/XXXXXX \ + ${BTEST} -d -A -x btest-results.xml -j ${ZEEK_CI_BTEST_JOBS} >btest.out 2>&1 & zeek_testing_pid=$! popd @@ -78,7 +80,8 @@ function run_external_btests { pushd testing/external/zeek-testing-private # Note that we don't use btest's "-d" flag or generate/upload any # artifacts to prevent leaking information about the private pcaps. - ${BTEST} -A -j ${ZEEK_CI_BTEST_JOBS} >btest.out 2>&1 & + ZEEK_PROFILER_FILE=$(pwd)/.tmp/script-coverage/XXXXXX \ + ${BTEST} -A -j ${ZEEK_CI_BTEST_JOBS} >btest.out 2>&1 & zeek_testing_private_pid=$! popd fi diff --git a/testing/btest/btest.cfg b/testing/btest/btest.cfg index c99919362b..5668992b56 100644 --- a/testing/btest/btest.cfg +++ b/testing/btest/btest.cfg @@ -28,7 +28,6 @@ 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 diff --git a/testing/external/subdir-btest.cfg b/testing/external/subdir-btest.cfg index c75de13e44..20c8500948 100644 --- a/testing/external/subdir-btest.cfg +++ b/testing/external/subdir-btest.cfg @@ -22,7 +22,6 @@ SCRIPTS=%(testbase)s/../scripts SCRIPTS_LOCAL=%(testbase)s/scripts DIST=%(testbase)s/../../.. BUILD=%(testbase)s/../../../%(build_dir)s -ZEEK_PROFILER_FILE=%(testbase)s/.tmp/script-coverage/XXXXXX ZEEK_DNS_FAKE=1 # Fedora/CentOS/RedHat have MD5 disabled for certificate verification and need setting an environment variable to permit it: OPENSSL_ENABLE_MD5_VERIFY=1