From 2f0af421f0cc443518d45e96bdbeee9804ada3c4 Mon Sep 17 00:00:00 2001 From: Simon Halvorsen Date: Fri, 28 Aug 2026 13:34:40 +0200 Subject: [PATCH] Updated asan-check to work in Jenkins Ticket: None Changelog: None Signed-off-by: Simon Halvorsen --- tests/asan-check/run_checks.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/asan-check/run_checks.sh b/tests/asan-check/run_checks.sh index 69fda5f60a4..8dae9cf930e 100755 --- a/tests/asan-check/run_checks.sh +++ b/tests/asan-check/run_checks.sh @@ -6,22 +6,25 @@ function check_with_asan() { local n_procs use_procs n_procs="$(getconf _NPROCESSORS_ONLN)" use_procs=$((n_procs/2)) - if [ "$use_procs" -lt "1" ]; then + if [ "$use_procs" -lt 1 ]; then use_procs=1 fi local asan_flags="-fsanitize=address" - ./autogen.sh --enable-debug && + # Assume we are in core directory + if [ -f ./configure ] ; then + ./configure -C --enable-debug + else + ./autogen.sh -C --enable-debug + fi make -j"${use_procs}" CFLAGS="-Werror -Wall -Wextra -Wno-sign-compare ${asan_flags}" LDFLAGS="${asan_flags}" && make -C tests/unit CFLAGS="${asan_flags}" LDFLAGS="${asan_flags}" check } cd "$(dirname "$0")"/../../ -failure=0 if ! check_with_asan; then echo "FAIL: ASAN compile/unit check failed"; - failure=1; + exit 1; fi -exit $failure