Merge remote-tracking branch 'origin/topic/timw/speed-up-zam-ci-testing'

* origin/topic/timw/speed-up-zam-ci-testing:
  CI: Use test.sh script for running ZAM tests, but disable parts of it

(cherry picked from commit d9a74680e0)
This commit is contained in:
Tim Wojtulewicz 2024-11-19 10:52:56 -07:00
parent 91067b32cc
commit 56b596a3e3
4 changed files with 28 additions and 9 deletions

View file

@ -401,12 +401,12 @@ asan_sanitizer_zam_task:
<< : *RESOURCES_TEMPLATE << : *RESOURCES_TEMPLATE
<< : *CI_TEMPLATE << : *CI_TEMPLATE
test_script:
# Run just the btests with zam as alternative.
- cd testing/btest && ../../auxil/btest/btest -a zam -A -d -b -j ${ZEEK_CI_BTEST_JOBS}
env: env:
ZEEK_CI_CONFIGURE_FLAGS: *ASAN_SANITIZER_CONFIG ZEEK_CI_CONFIGURE_FLAGS: *ASAN_SANITIZER_CONFIG
ASAN_OPTIONS: detect_leaks=1:detect_odr_violation=0 ASAN_OPTIONS: detect_leaks=1:detect_odr_violation=0
ZEEK_CI_SKIP_UNIT_TESTS: 1
ZEEK_CI_SKIP_EXTERNAL_BTESTS: 1
ZEEK_CI_BTEST_EXTRA_ARGS: -a zam
<< : *ZAM_SKIP_TASK_ON_PR << : *ZAM_SKIP_TASK_ON_PR
ubsan_sanitizer_task: ubsan_sanitizer_task:
@ -432,15 +432,15 @@ ubsan_sanitizer_zam_task:
<< : *RESOURCES_TEMPLATE << : *RESOURCES_TEMPLATE
<< : *CI_TEMPLATE << : *CI_TEMPLATE
test_script:
# Run just the btests with zam as alternative.
- cd testing/btest && ../../auxil/btest/btest -a zam -A -d -b -j ${ZEEK_CI_BTEST_JOBS}
env: env:
CC: clang-18 CC: clang-18
CXX: clang++-18 CXX: clang++-18
ZEEK_CI_CONFIGURE_FLAGS: *UBSAN_SANITIZER_CONFIG ZEEK_CI_CONFIGURE_FLAGS: *UBSAN_SANITIZER_CONFIG
ZEEK_TAILORED_UB_CHECKS: 1 ZEEK_TAILORED_UB_CHECKS: 1
UBSAN_OPTIONS: print_stacktrace=1 UBSAN_OPTIONS: print_stacktrace=1
ZEEK_CI_SKIP_UNIT_TESTS: 1
ZEEK_CI_SKIP_EXTERNAL_BTESTS: 1
ZEEK_CI_BTEST_EXTRA_ARGS: -a zam
<< : *ZAM_SKIP_TASK_ON_PR << : *ZAM_SKIP_TASK_ON_PR
tsan_sanitizer_task: tsan_sanitizer_task:

View file

@ -1,3 +1,12 @@
7.0.3-26 | 2024-11-19 10:56:06 -0700
* Merge remote-tracking branch 'origin/topic/timw/speed-up-zam-ci-testing' (Tim Wojtulewicz, Corelight)
* origin/topic/timw/speed-up-zam-ci-testing:
CI: Use test.sh script for running ZAM tests, but disable parts of it
(cherry picked from commit d9a74680e08553b34cb164847f61b0ea00ad1f5f)
7.0.3-24 | 2024-11-19 09:32:54 -0700 7.0.3-24 | 2024-11-19 09:32:54 -0700
* account for spaces encoding to plus signs in sqli regex detection (Cooper Grill) * account for spaces encoding to plus signs in sqli regex detection (Cooper Grill)

View file

@ -1 +1 @@
7.0.3-24 7.0.3-26

View file

@ -40,6 +40,11 @@ function banner {
} }
function run_unit_tests { function run_unit_tests {
if [[ ${ZEEK_CI_SKIP_UNIT_TESTS} -eq 1 ]]; then
printf "Skipping unit tests as requested by task configureation\n\n"
return 0
fi
banner "Running unit tests" banner "Running unit tests"
pushd build pushd build
@ -60,7 +65,7 @@ function run_btests {
pushd testing/btest pushd testing/btest
ZEEK_PROFILER_FILE=$(pwd)/.tmp/script-coverage/XXXXXX \ 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 ${BTEST} -z ${ZEEK_CI_BTEST_RETRIES} -d -A -x btest-results.xml -j ${ZEEK_CI_BTEST_JOBS} ${ZEEK_CI_BTEST_EXTRA_ARGS} || result=1
make coverage make coverage
prep_artifacts prep_artifacts
popd popd
@ -68,11 +73,16 @@ function run_btests {
} }
function run_external_btests { function run_external_btests {
if [[ ${ZEEK_CI_SKIP_EXTERNAL_BTESTS} -eq 1 ]]; then
printf "Skipping external tests as requested by task configuration\n\n"
return 0
fi
local zeek_testing_pid="" local zeek_testing_pid=""
local zeek_testing_pid_private="" local zeek_testing_pid_private=""
pushd testing/external/zeek-testing pushd testing/external/zeek-testing
ZEEK_PROFILER_FILE=$(pwd)/.tmp/script-coverage/XXXXXX \ ZEEK_PROFILER_FILE=$(pwd)/.tmp/script-coverage/XXXXXX \
${BTEST} -d -A -x btest-results.xml -j ${ZEEK_CI_BTEST_JOBS} >btest.out 2>&1 & ${BTEST} -d -A -x btest-results.xml -j ${ZEEK_CI_BTEST_JOBS} ${ZEEK_CI_BTEST_EXTRA_ARGS} >btest.out 2>&1 &
zeek_testing_pid=$! zeek_testing_pid=$!
popd popd