Disable test hooks when checking missing symbols

The function mbedtls_test_hook_error_add() is declared in the library
but supplied by test helpers in framework/tests/src, so it is undefined
in library-only builds. This messes up our checks for missing symbols,
so disable MBEDTLS_TEST_HOOKS when we are building to check missing
symbols.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann 2024-11-12 14:18:37 +00:00
parent 5b80448105
commit cbf530dde7

View File

@ -160,6 +160,9 @@ component_test_default_psa_crypto_client_without_crypto_provider () {
scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
scripts/config.py set MBEDTLS_PSA_CRYPTO_CLIENT
scripts/config.py unset MBEDTLS_LMS_C
# Test hooks may rely on functions defined in test helpers, which would
# not be built here, leading to a spurious undefined symbol.
scripts/config.py unset MBEDTLS_TEST_HOOKS
make
@ -181,6 +184,9 @@ component_build_full_psa_crypto_client_without_crypto_provider () {
# Dynamic secure element support is a deprecated feature and it is not
# available when CRYPTO_C and PSA_CRYPTO_STORAGE_C are disabled.
scripts/config.py unset MBEDTLS_PSA_CRYPTO_SE_C
# Test hooks may rely on functions defined in test helpers, which would
# not be built here, leading to a spurious undefined symbol.
scripts/config.py unset MBEDTLS_TEST_HOOKS
# Since there is no crypto provider in this build it is not possible to
# build all the test executables and progrems due to missing PSA functions