Skip to content

Commit 5677b38

Browse files
orenc17Oren Cohen
authored andcommitted
Reset ITS before the test start
1 parent 774294d commit 5677b38

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

TESTS/psa/attestation/main.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "greentea-client/test_env.h"
2424
#include "unity/unity.h"
2525
#include "utest/utest.h"
26+
#include "psa/lifecycle.h"
2627
#include "psa_initial_attestation_api.h"
2728
#include "psa_attest_inject_key.h"
2829
#include <string.h>
@@ -126,11 +127,6 @@ utest::v1::status_t case_teardown_handler(const Case *const source, const size_t
126127
return greentea_case_teardown_handler(source, passed, failed, reason);
127128
}
128129

129-
utest::v1::status_t case_setup_handler(const Case *const source, const size_t index_of_case)
130-
{
131-
return greentea_case_setup_handler(source, index_of_case);
132-
}
133-
134130
Case cases[] = {
135131
Case("PSA attestation get token", check_initial_attestation_get_token, case_teardown_handler),
136132
};
@@ -139,6 +135,8 @@ Specification specification(greentea_test_setup, cases);
139135

140136
int main()
141137
{
138+
psa_status_t status = mbed_psa_reboot_and_request_new_security_state(PSA_LIFECYCLE_ASSEMBLY_AND_TEST);
139+
TEST_ASSERT_EQUAL(PSA_LIFECYCLE_SUCCESS, status);
142140
#if (defined(COMPONENT_PSA_SRV_IPC) || defined(MBEDTLS_ENTROPY_NV_SEED))
143141
uint8_t seed[MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE] = {0};
144142
/* inject some seed for test*/

0 commit comments

Comments
 (0)