Merge pull request #85 from minosgalanakis/libtestdriver_companion_pr9567

all-core/helpers: Added support for libtestdriver post repo split
This commit is contained in:
Ronald Cron
2024-12-04 15:27:54 +01:00
committed by GitHub
2 changed files with 16 additions and 8 deletions
+6 -6
View File
@@ -153,18 +153,18 @@ pre_load_components () {
pre_initialize_variables () {
if in_mbedtls_repo; then
CONFIG_H='include/mbedtls/mbedtls_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'
CONFIG_TEST_DRIVER_H='tf-psa-crypto/tests/configs/config_test_driver.h'
else
if in_3_6_branch; then
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'
else
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/crypto_config_test_driver.h'
fi
config_files="$CONFIG_H $CRYPTO_CONFIG_H $CONFIG_TEST_DRIVER_H"
else
+10 -2
View File
@@ -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
}