mirror of https://github.com/ARMmbed/mbed-os.git
Basic test can run on single v7's
parent
fa5c96c857
commit
86c7a59b36
|
@ -16,8 +16,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if ((!defined(TARGET_PSA)) || (!defined(COMPONENT_PSA_SRV_IPC)) || (!defined(MBEDTLS_PSA_CRYPTO_C)))
|
#if ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C)))
|
||||||
#error [NOT_SUPPORTED] Mbed SPM Crypto is OFF - skipping.
|
#error [NOT_SUPPORTED] Mbed Crypto is OFF - skipping.
|
||||||
#endif // TARGET_PSA
|
#endif // TARGET_PSA
|
||||||
|
|
||||||
#include "greentea-client/test_env.h"
|
#include "greentea-client/test_env.h"
|
||||||
|
@ -49,6 +49,9 @@ utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
|
||||||
|
|
||||||
static void check_multi_crypto_init_deinit()
|
static void check_multi_crypto_init_deinit()
|
||||||
{
|
{
|
||||||
|
#if !defined(COMPONENT_PSA_SRV_IPC)
|
||||||
|
TEST_SKIP();
|
||||||
|
#endif
|
||||||
uint8_t output[TEST_RANDOM_SIZE] = {0};
|
uint8_t output[TEST_RANDOM_SIZE] = {0};
|
||||||
|
|
||||||
psa_status_t status = psa_crypto_init();
|
psa_status_t status = psa_crypto_init();
|
||||||
|
@ -98,6 +101,7 @@ Specification specification(greentea_test_setup, cases, greentea_test_teardown_h
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
#if (defined(COMPONENT_PSA_SRV_IPC) || defined(MBEDTLS_ENTROPY_NV_SEED))
|
||||||
uint8_t seed[MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE] = {0};
|
uint8_t seed[MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE] = {0};
|
||||||
/* inject some a seed for test*/
|
/* inject some a seed for test*/
|
||||||
for (int i = 0; i < MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE; ++i) {
|
for (int i = 0; i < MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE; ++i) {
|
||||||
|
@ -106,5 +110,6 @@ int main()
|
||||||
|
|
||||||
/* don't really care if this succeed this is just to make crypto init pass*/
|
/* don't really care if this succeed this is just to make crypto init pass*/
|
||||||
mbedtls_psa_inject_entropy(seed, MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE);
|
mbedtls_psa_inject_entropy(seed, MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE);
|
||||||
|
#endif
|
||||||
return !Harness::run(specification);
|
return !Harness::run(specification);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue