From c98f8ab5f7879fd1a42ba325f7909c109443b691 Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Fri, 10 May 2024 15:53:40 +0200 Subject: [PATCH] crypto-client: allow debug build of libraries and test binaries Add DEBUG=1 in test_psasim() to helpers and final make to build the libraries and the final binaries with debug symbols enabled. Signed-off-by: Valerio Setti --- tests/psa-client-server/psasim/Makefile | 2 +- tests/scripts/all.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/psa-client-server/psasim/Makefile b/tests/psa-client-server/psasim/Makefile index 583f1b9b70..01e3486b65 100644 --- a/tests/psa-client-server/psasim/Makefile +++ b/tests/psa-client-server/psasim/Makefile @@ -1,7 +1,7 @@ CFLAGS += -Wall -Werror -std=c99 -D_XOPEN_SOURCE=1 -D_POSIX_C_SOURCE=200809L ifeq ($(DEBUG),1) - CFLAGS += -DDEBUG +CFLAGS += -DDEBUG -O0 -g endif LIBPSACLIENT := -Llibpsaclient/ -lmbedcrypto -lmbedx509 -lmbedtls diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index eee0042e4f..2f4ee25e81 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -948,6 +948,7 @@ helper_libtestdriver1_make_main() { # $1: target which can be "client" or "server" helper_crypto_client_build() { TARGET=$1 + shift TARGET_LIB=libpsa$TARGET cp $CONFIG_H $CONFIG_H.bak @@ -977,7 +978,7 @@ helper_crypto_client_build() { scripts/config.py unset MBEDTLS_PLATFORM_NV_SEED_ALT fi - make -C tests/psa-client-server/psasim/ CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_CFLAGS" $TARGET_LIB + make -C tests/psa-client-server/psasim/ CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_CFLAGS" $TARGET_LIB $@ rm $CONFIG_H mv $CONFIG_H.bak $CONFIG_H