Adapt libtestdriver1 build

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron 2024-07-02 07:59:11 +02:00
parent 52cd108ab2
commit b2bdb78596
10 changed files with 17 additions and 15 deletions

View File

@ -268,11 +268,11 @@ define libtestdriver1_rewrite :=
s/\b(?=mbedtls_|psa_)/libtestdriver1_/g;
endef
libtestdriver1.a: export MBEDTLS_PATH := $(patsubst ../..//%,/%,../../$(MBEDTLS_PATH))
libtestdriver1.a:
# Copy the library and fake a 3rdparty Makefile include.
rm -Rf ./libtestdriver1
mkdir ./libtestdriver1
cp -Rf ../framework ./libtestdriver1
cp -Rf ../library ./libtestdriver1
cp -Rf ../include ./libtestdriver1
cp -Rf ../tf-psa-crypto ./libtestdriver1
@ -298,8 +298,10 @@ libtestdriver1.a:
# when this test driver library is linked with the Mbed TLS library.
perl -pi -e '$(libtestdriver1_rewrite)' ./libtestdriver1/library/*.[ch]
perl -pi -e '$(libtestdriver1_rewrite)' ./libtestdriver1/include/*/*.h
perl -pi -e '$(libtestdriver1_rewrite)' ./libtestdriver1/tf-psa-crypto/core/*.[ch]
perl -pi -e '$(libtestdriver1_rewrite)' ./libtestdriver1/tf-psa-crypto/include/*/*.h
perl -pi -e '$(libtestdriver1_rewrite)' ./libtestdriver1/tf-psa-crypto/drivers/builtin/include/*/*.h
perl -pi -e '$(libtestdriver1_rewrite)' ./libtestdriver1/tf-psa-crypto/drivers/builtin/src/*.[ch]
$(MAKE) -C ./libtestdriver1/library CFLAGS="-I../../ $(CFLAGS)" LDFLAGS="$(LDFLAGS)" libmbedcrypto.a
cp ./libtestdriver1/library/libmbedcrypto.a ../library/libtestdriver1.a

View File

@ -13,7 +13,7 @@
#include "test/drivers/hash.h"
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
#include "libtestdriver1/library/psa_crypto_hash.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_hash.h"
#endif
mbedtls_test_driver_hash_hooks_t

View File

@ -16,7 +16,7 @@
#include "mbedtls/constant_time.h"
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
#include "libtestdriver1/library/psa_crypto_aead.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_aead.h"
#endif
mbedtls_test_driver_aead_hooks_t

View File

@ -16,7 +16,7 @@
#include "test/drivers/key_management.h"
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
#include "libtestdriver1/library/psa_crypto_rsa.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_rsa.h"
#endif
#define PSA_RSA_KEY_PAIR_MAX_SIZE \

View File

@ -19,7 +19,7 @@
#include "test/random.h"
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
#include "libtestdriver1/library/psa_crypto_cipher.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_cipher.h"
#endif
#include <string.h>

View File

@ -21,8 +21,8 @@
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
#include "libtestdriver1/tf-psa-crypto/include/psa/crypto.h"
#include "libtestdriver1/library/psa_crypto_ecp.h"
#include "libtestdriver1/library/psa_crypto_ffdh.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_ecp.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_ffdh.h"
#endif
mbedtls_test_driver_key_agreement_hooks_t

View File

@ -23,9 +23,9 @@
#include "test/random.h"
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
#include "libtestdriver1/library/psa_crypto_ecp.h"
#include "libtestdriver1/library/psa_crypto_rsa.h"
#include "libtestdriver1/library/psa_crypto_ffdh.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_ecp.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_rsa.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_ffdh.h"
#endif
#include <string.h>

View File

@ -13,7 +13,7 @@
#include "test/drivers/mac.h"
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
#include "libtestdriver1/library/psa_crypto_mac.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_mac.h"
#endif
mbedtls_test_driver_mac_hooks_t mbedtls_test_driver_mac_hooks =

View File

@ -14,7 +14,7 @@
#include "string.h"
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
#include "libtestdriver1/library/psa_crypto_pake.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_pake.h"
#endif
mbedtls_test_driver_pake_hooks_t mbedtls_test_driver_pake_hooks =

View File

@ -26,9 +26,9 @@
#include "test/random.h"
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
#include "libtestdriver1/library/psa_crypto_ecp.h"
#include "libtestdriver1/library/psa_crypto_hash.h"
#include "libtestdriver1/library/psa_crypto_rsa.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_ecp.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_hash.h"
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_rsa.h"
#endif
#include <string.h>