Skip to content

Commit d556bf6

Browse files
authored
Merge pull request #11821 from rajkan01/feature-baremetal-greentea-psa
Skip Bare Metal green tea test for PSA component
2 parents dd753ab + 829e90a commit d556bf6

File tree

14 files changed

+61
-0
lines changed

14 files changed

+61
-0
lines changed

TESTS/mbedtls/selftest/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
#include "greentea-client/test_env.h"
1919
#include "unity.h"
2020
#include "utest.h"
21+
#if defined(MBED_CONF_RTOS_PRESENT)
2122
#include "rtos.h"
23+
#endif
2224

2325
using namespace utest::v1;
2426

TESTS/psa/attestation/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
* limitations under the License.
1717
*/
1818

19+
#if !defined(MBED_CONF_RTOS_PRESENT)
20+
#error [NOT_SUPPORTED] PSA attestation test cases require RTOS to run.
21+
#else
22+
1923
#include "psa/crypto.h"
2024

2125
#if ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C)))
@@ -157,3 +161,4 @@ int main()
157161
}
158162

159163
#endif // ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C)))
164+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

TESTS/psa/its_ps/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
* limitations under the License.
1717
*/
1818

19+
#if !defined(MBED_CONF_RTOS_PRESENT)
20+
#error [NOT_SUPPORTED] ITS/PS test cases require RTOS to run.
21+
#else
22+
1923
#ifndef TARGET_PSA
2024
#error [NOT_SUPPORTED] ITS/PS tests can run only on PSA-enabled targets.
2125
#else
@@ -239,3 +243,4 @@ int main()
239243
}
240244

241245
#endif // TARGET_PSA
246+
#endif // !defined(MBED_CONF_RTOS_PRESENT)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#include "val_interfaces.h"
22
#include "pal_mbed_os_intf.h"
33

4+
#if !defined(MBED_CONF_RTOS_PRESENT)
5+
#error [NOT_SUPPORTED] PSA compliance attestation test cases require RTOS to run.
6+
#else
47
void test_entry_a001(val_api_t *val_api, psa_api_t *psa_api);
58

69
int main(void)
710
{
811
test_start(test_entry_a001, COMPLIANCE_TEST_ATTESTATION);
912
}
13+
#endif

components/TARGET_PSA/TESTS/compliance_its/test_s001/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "val_interfaces.h"
22
#include "pal_mbed_os_intf.h"
33

4+
#if !defined(MBED_CONF_RTOS_PRESENT)
5+
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
6+
#else
7+
48
#ifdef ITS_TEST
59
void test_entry_s001(val_api_t *val_api, psa_api_t *psa_api);
610
#elif PS_TEST
@@ -15,3 +19,4 @@ int main(void)
1519
test_start(test_entry_p001, COMPLIANCE_TEST_STORAGE);
1620
#endif
1721
}
22+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

components/TARGET_PSA/TESTS/compliance_its/test_s002/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#include "val_interfaces.h"
22
#include "pal_mbed_os_intf.h"
33
#include "lifecycle.h"
4+
#if !defined(MBED_CONF_RTOS_PRESENT)
5+
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
6+
#else
47

58
#ifdef ITS_TEST
69
void test_entry_s002(val_api_t *val_api, psa_api_t *psa_api);
@@ -16,3 +19,4 @@ int main(void)
1619
test_start(test_entry_p002, COMPLIANCE_TEST_STORAGE);
1720
#endif
1821
}
22+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

components/TARGET_PSA/TESTS/compliance_its/test_s004/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#include "val_interfaces.h"
22
#include "pal_mbed_os_intf.h"
3+
#if !defined(MBED_CONF_RTOS_PRESENT)
4+
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
5+
#else
36

47
#ifdef ITS_TEST
58
void test_entry_s004(val_api_t *val_api, psa_api_t *psa_api);
@@ -15,3 +18,4 @@ int main(void)
1518
test_start(test_entry_p004, COMPLIANCE_TEST_STORAGE);
1619
#endif
1720
}
21+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

components/TARGET_PSA/TESTS/compliance_its/test_s005/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "val_interfaces.h"
22
#include "pal_mbed_os_intf.h"
33

4+
#if !defined(MBED_CONF_RTOS_PRESENT)
5+
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
6+
#else
7+
48
#ifdef ITS_TEST
59
void test_entry_s005(val_api_t *val_api, psa_api_t *psa_api);
610
#elif PS_TEST
@@ -15,3 +19,4 @@ int main(void)
1519
test_start(test_entry_p005, COMPLIANCE_TEST_STORAGE);
1620
#endif
1721
}
22+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

components/TARGET_PSA/TESTS/compliance_its/test_s006/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "val_interfaces.h"
22
#include "pal_mbed_os_intf.h"
33

4+
#if !defined(MBED_CONF_RTOS_PRESENT)
5+
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
6+
#else
7+
48
#ifdef ITS_TEST
59
void test_entry_s006(val_api_t *val_api, psa_api_t *psa_api);
610
#elif PS_TEST
@@ -15,3 +19,4 @@ int main(void)
1519
test_start(test_entry_p006, COMPLIANCE_TEST_STORAGE);
1620
#endif
1721
}
22+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

components/TARGET_PSA/TESTS/compliance_its/test_s007/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "val_interfaces.h"
22
#include "pal_mbed_os_intf.h"
33

4+
#if !defined(MBED_CONF_RTOS_PRESENT)
5+
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
6+
#else
7+
48
#ifdef ITS_TEST
59
void test_entry_s007(val_api_t *val_api, psa_api_t *psa_api);
610
#elif PS_TEST
@@ -15,3 +19,4 @@ int main(void)
1519
test_start(test_entry_p007, COMPLIANCE_TEST_STORAGE);
1620
#endif
1721
}
22+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

components/TARGET_PSA/TESTS/compliance_its/test_s008/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "val_interfaces.h"
22
#include "pal_mbed_os_intf.h"
33

4+
#if !defined(MBED_CONF_RTOS_PRESENT)
5+
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
6+
#else
7+
48
#ifdef ITS_TEST
59
void test_entry_s008(val_api_t *val_api, psa_api_t *psa_api);
610
#elif PS_TEST
@@ -15,3 +19,4 @@ int main(void)
1519
test_start(test_entry_p008, COMPLIANCE_TEST_STORAGE);
1620
#endif
1721
}
22+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

components/TARGET_PSA/TESTS/compliance_its/test_s009/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "val_interfaces.h"
22
#include "pal_mbed_os_intf.h"
33

4+
#if !defined(MBED_CONF_RTOS_PRESENT)
5+
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
6+
#else
7+
48
#ifdef ITS_TEST
59
void test_entry_s009(val_api_t *val_api, psa_api_t *psa_api);
610
#elif PS_TEST
@@ -15,3 +19,4 @@ int main(void)
1519
test_start(test_entry_p009, COMPLIANCE_TEST_STORAGE);
1620
#endif
1721
}
22+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

components/TARGET_PSA/TESTS/compliance_its/test_s010/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "val_interfaces.h"
22
#include "pal_mbed_os_intf.h"
33

4+
#if !defined(MBED_CONF_RTOS_PRESENT)
5+
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
6+
#else
7+
48
#ifdef ITS_TEST
59
void test_entry_s010(val_api_t *val_api, psa_api_t *psa_api);
610
#elif PS_TEST
@@ -15,3 +19,4 @@ int main(void)
1519
test_start(test_entry_p010, COMPLIANCE_TEST_STORAGE);
1620
#endif
1721
}
22+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

features/frameworks/TARGET_PSA/pal/pal_mbed_os_intf.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,11 @@ int test_start(test_entry_f test_f, compliance_test_type type)
135135
{
136136
test_g = test_f;
137137
type_g = type;
138+
#if defined(MBED_CONF_RTOS_PRESENT)
138139
MBED_ASSERT((type > COMPLIANCE_TEST_START) && (type < COMPLIANCE_TEST_END));
139140
Thread thread(osPriorityNormal, TEST_STACK_SIZE, NULL);
140141
thread.start(main_wrapper);
141142
thread.join();
143+
#endif
142144
return 0;
143145
}

0 commit comments

Comments
 (0)