From dbe4be448f547115773a6493422ddde5a77344e1 Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Wed, 27 Nov 2024 11:17:49 +0000 Subject: [PATCH] libtestdriver: Introduce crypto_config_test_driver. tf-psa configuration options for the libtestdriver have been migrated to `crypto_config_test_driver.h` Signed-off-by: Minos Galanakis --- scripts/all-core.sh | 12 ++++++++++-- scripts/all-helpers.sh | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/scripts/all-core.sh b/scripts/all-core.sh index a2dc0d14e..5f490f161 100644 --- a/scripts/all-core.sh +++ b/scripts/all-core.sh @@ -157,14 +157,22 @@ pre_initialize_variables () { CRYPTO_CONFIG_H='tf-psa-crypto/include/psa/crypto_config.h' PSA_CORE_PATH='tf-psa-crypto/core' BUILTIN_SRC_PATH='tf-psa-crypto/drivers/builtin/src' - CONFIG_TEST_DRIVER_H='tf-psa-crypto/tests/configs/config_test_driver.h' + if in_3_6_branch; then + CONFIG_TEST_DRIVER_H='tf-psa-crypto/tests/configs/config_test_driver.h' + else + CONFIG_TEST_DRIVER_H='tf-psa-crypto/tests/configs/crypto_config_test_driver.h' + fi else CRYPTO_CONFIG_H='include/psa/crypto_config.h' # helper_armc6_build_test() relies on these being defined, # but empty if the paths don't exist (as in 3.6). PSA_CORE_PATH='' BUILTIN_SRC_PATH='' - CONFIG_TEST_DRIVER_H='tests/configs/config_test_driver.h' + if in_3_6_branch; then + CONFIG_TEST_DRIVER_H='tests/configs/config_test_driver.h' + else + CONFIG_TEST_DRIVER_H='tests/configs/crypto_config_test_driver.h' + fi fi config_files="$CONFIG_H $CRYPTO_CONFIG_H $CONFIG_TEST_DRIVER_H" else diff --git a/scripts/all-helpers.sh b/scripts/all-helpers.sh index 82609b52e..ee64e467f 100644 --- a/scripts/all-helpers.sh +++ b/scripts/all-helpers.sh @@ -80,11 +80,19 @@ helper_libtestdriver1_adjust_config() { # If threading is enabled on the normal build, then we need to enable it in the drivers as well, # otherwise we will end up running multithreaded tests without mutexes to protect them. if scripts/config.py get MBEDTLS_THREADING_C; then - scripts/config.py -f "$CONFIG_TEST_DRIVER_H" set MBEDTLS_THREADING_C + if in_3_6_branch; then + scripts/config.py -f "$CONFIG_TEST_DRIVER_H" set MBEDTLS_THREADING_C + else + scripts/config.py -c "$CONFIG_TEST_DRIVER_H" set MBEDTLS_THREADING_C + fi fi if scripts/config.py get MBEDTLS_THREADING_PTHREAD; then - scripts/config.py -f "$CONFIG_TEST_DRIVER_H" set MBEDTLS_THREADING_PTHREAD + if in_3_6_branch; then + scripts/config.py -f "$CONFIG_TEST_DRIVER_H" set MBEDTLS_THREADING_PTHREAD + else + scripts/config.py -c "$CONFIG_TEST_DRIVER_H" set MBEDTLS_THREADING_PTHREAD + fi fi }