Skip to content

Commit 86c7a59

Browse files
author
Oren Cohen
committed
Basic test can run on single v7's
1 parent fa5c96c commit 86c7a59

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

TESTS/psa/crypto_init/main.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
* limitations under the License.
1717
*/
1818

19-
#if ((!defined(TARGET_PSA)) || (!defined(COMPONENT_PSA_SRV_IPC)) || (!defined(MBEDTLS_PSA_CRYPTO_C)))
20-
#error [NOT_SUPPORTED] Mbed SPM Crypto is OFF - skipping.
19+
#if ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C)))
20+
#error [NOT_SUPPORTED] Mbed Crypto is OFF - skipping.
2121
#endif // TARGET_PSA
2222

2323
#include "greentea-client/test_env.h"
@@ -49,6 +49,9 @@ utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
4949

5050
static void check_multi_crypto_init_deinit()
5151
{
52+
#if !defined(COMPONENT_PSA_SRV_IPC)
53+
TEST_SKIP();
54+
#endif
5255
uint8_t output[TEST_RANDOM_SIZE] = {0};
5356

5457
psa_status_t status = psa_crypto_init();
@@ -98,6 +101,7 @@ Specification specification(greentea_test_setup, cases, greentea_test_teardown_h
98101

99102
int main()
100103
{
104+
#if (defined(COMPONENT_PSA_SRV_IPC) || defined(MBEDTLS_ENTROPY_NV_SEED))
101105
uint8_t seed[MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE] = {0};
102106
/* inject some a seed for test*/
103107
for (int i = 0; i < MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE; ++i) {
@@ -106,5 +110,6 @@ int main()
106110

107111
/* don't really care if this succeed this is just to make crypto init pass*/
108112
mbedtls_psa_inject_entropy(seed, MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE);
113+
#endif
109114
return !Harness::run(specification);
110115
}

0 commit comments

Comments
 (0)