Add support for libtestdriver1 #61

Closed
opened 2023-09-26 10:18:53 -05:00 by ronald-cron-arm · 0 comments
ronald-cron-arm commented 2023-09-26 10:18:53 -05:00 (Migrated from github.com)

Adapt to CMake build system the libtestdriver1 helper shell functions:

  • helper_libtestdriver1_adjust_config
  • helper_libtestdriver1_make_drivers: need to add support for the build of the test library in tests/CMakeLists.txt
  • helper_libtestdriver1_make_main

As of mbedtls:dev(bae154d76cfe0ee844bf88efc5bbe75e2088d4b0), these helper shell functions are located in all.sh that is yet to be moved to the framework. If they stay in all.sh(preferred), the 3.6 and mbedtls:dev components may need some adaptation. If the helper shell functions needs to be different for TF-PSA-Crypto and mbedtls then they need to be moved into
the branch dependent components-configuration-crypto.sh file.

Demonstrate testing with libtestdriver1 by adding the equivalent of test_psa_crypto_config_accel_ecdsa.

Revisit the compilation guards in tests/src/drivers/*.c like:

if (MBEDTLS_VERSION_MAJOR == 3) && (MBEDTLS_VERSION_MINOR == 6)
#include "libtestdriver1/library/psa_crypto_hash.h"
#else
#include "libtestdriver1/tf-psa-crypto/core/psa_crypto_hash.h"
#endif
#endif

Can we do better?

Adapt to CMake build system the libtestdriver1 helper shell functions: - helper_libtestdriver1_adjust_config - helper_libtestdriver1_make_drivers: need to add support for the build of the test library in tests/CMakeLists.txt - helper_libtestdriver1_make_main As of mbedtls:dev(bae154d76cfe0ee844bf88efc5bbe75e2088d4b0), these helper shell functions are located in all.sh that is yet to be moved to the framework. If they stay in all.sh(preferred), the 3.6 and mbedtls:dev components may need some adaptation. If the helper shell functions needs to be different for TF-PSA-Crypto and mbedtls then they need to be moved into the branch dependent components-configuration-crypto.sh file. Demonstrate testing with `libtestdriver1` by adding the equivalent of `test_psa_crypto_config_accel_ecdsa`. Revisit the compilation guards in `tests/src/drivers/*.c` like: ```C if (MBEDTLS_VERSION_MAJOR == 3) && (MBEDTLS_VERSION_MINOR == 6) #include "libtestdriver1/library/psa_crypto_hash.h" #else #include "libtestdriver1/tf-psa-crypto/core/psa_crypto_hash.h" #endif #endif ``` Can we do better?
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto#61
No description provided.