From 9027955afca489d5cda78601801d04730799ad22 Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Thu, 4 Jul 2024 09:25:59 +0200 Subject: [PATCH] all.sh: Move definitions of PSA core and builtin source paths Move the definitions of PSA core and builtin source paths to pre_initialize_variables where they are merged with the definition of the configuration file paths. Add the 3.6 case by the way as pre_initialize_variables is planned to be in the all.sh part that will land in mbedtls-framework at some point. Signed-off-by: Ronald Cron --- tests/scripts/all.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 7e09f18e4..b2f6bf2a4 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -133,10 +133,18 @@ pre_check_environment () { pre_initialize_variables () { if in_mbedtls_repo; then CONFIG_H='include/mbedtls/mbedtls_config.h' - CRYPTO_CONFIG_H='tf-psa-crypto/include/psa/crypto_config.h' + if [ -d tf-psa-crypto ]; then + 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' + else + CRYPTO_CONFIG_H='include/psa/crypto_config.h' + fi else CONFIG_H='drivers/builtin/include/mbedtls/mbedtls_config.h' CRYPTO_CONFIG_H='include/psa/crypto_config.h' + PSA_CORE_PATH='core' + BUILTIN_SRC_PATH='drivers/builtin/src' fi CONFIG_TEST_DRIVER_H='tests/include/test/drivers/config_test_driver.h' @@ -449,8 +457,12 @@ armc6_build_test() msg "size: ARM Compiler 6 ($FLAGS)" "$ARMC6_FROMELF" -z library/*.o - "$ARMC6_FROMELF" -z ${PSA_CORE_PATH}/*.o - "$ARMC6_FROMELF" -z ${BUILTIN_SRC_PATH}/*.o + if [ -n ${PSA_CORE_PATH} ]; then + "$ARMC6_FROMELF" -z ${PSA_CORE_PATH}/*.o + fi + if [ -n ${BUILTIN_SRC_PATH} ]; then + "$ARMC6_FROMELF" -z ${BUILTIN_SRC_PATH}/*.o + fi } err_msg() @@ -1101,9 +1113,6 @@ helper_psasim_server() { #### Basic checks ################################################################ -export PSA_CORE_PATH="tf-psa-crypto/core" -export BUILTIN_SRC_PATH="tf-psa-crypto/drivers/builtin/src" - # # Test Suites to be executed #