Skip to content

Commit 09d9287

Browse files
authored
Merge pull request #11721 from rajkan01/feature-baremetal-greentea
Bare metal greentea support
2 parents 78d26a7 + 6437f99 commit 09d9287

File tree

55 files changed

+301
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+301
-109
lines changed

TESTS/configs/baremetal.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"requires": [
3+
"bare-metal",
4+
"rtos-api",
5+
"greentea-client",
6+
"utest",
7+
"unity",
8+
"psa",
9+
"mbed-crypto",
10+
"mbedtls",
11+
"psa-compliance-framework",
12+
"filesystem",
13+
"littlefs",
14+
"mbed-trace",
15+
"device_key",
16+
"storage_tdb_internal",
17+
"storage_filesystem",
18+
"storage_tdb_external",
19+
"lora",
20+
"nfc",
21+
"network-emac",
22+
"nanostack-libservice",
23+
"flashiap-block-device",
24+
"system-storage",
25+
"filesystemstore",
26+
"SecureStore",
27+
"storage",
28+
"kv-map",
29+
"direct-access-devicekey",
30+
"tdbstore",
31+
"kv-config",
32+
"events",
33+
"kv-global-api",
34+
"sd",
35+
"nvstore"
36+
],
37+
"target_overrides": {
38+
"*": {
39+
"target.device_has_remove": ["EMAC", "USBDEVICE"]
40+
}
41+
}
42+
}

TESTS/events/queue/main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
#include "mbed_events.h"
1717
#include "mbed.h"
18-
#include "rtos.h"
1918
#include "greentea-client/test_env.h"
2019
#include "unity.h"
2120
#include "utest.h"

TESTS/events/timing/main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
#include "mbed_events.h"
1717
#include "mbed.h"
18-
#include "rtos.h"
1918
#include "greentea-client/test_env.h"
2019
#include "unity.h"
2120
#include "utest.h"

TESTS/integration/COMMON/download_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
2222
*/
2323

24+
#if INTEGRATION_TESTS
25+
2426
#include "mbed.h"
2527
#include "unity/unity.h"
2628
#include "greentea-client/test_env.h"
@@ -202,4 +204,4 @@ size_t download_test(NetworkInterface *interface, const unsigned char *data, siz
202204

203205
return received_bytes;
204206
}
205-
207+
#endif // INTEGRATION_TESTS

TESTS/integration/COMMON/download_test.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@
2020
/*
2121
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
2222
*/
23-
2423
size_t download_test(NetworkInterface *interface, const unsigned char *data, size_t data_length, size_t buff_size, uint32_t thread_id = 0);
2524

TESTS/integration/COMMON/file_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
/*
2121
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
2222
*/
23+
#if INTEGRATION_TESTS
2324

2425
#include "mbed.h"
2526
#include "unity/unity.h"
@@ -103,3 +104,4 @@ void file_test_read(const char *file, size_t offset, const unsigned char *data,
103104
float(data_length) / 1024, float(data_length) / timer.read() / 1024, timer.read());
104105
}
105106

107+
#endif //#if INTEGRATION_TESTS

TESTS/integration/COMMON/file_test.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
/*
2121
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
2222
*/
23-
2423
void file_test_write(const char *file, size_t offset, const unsigned char *data, size_t data_length, size_t block_size);
2524

2625
void file_test_read(const char *file, size_t offset, const unsigned char *data, size_t data_length, size_t block_size);

TESTS/integration/fs-single/main.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
2222
*/
2323

24+
#if !INTEGRATION_TESTS
25+
#error [NOT_SUPPORTED] integration tests not enabled for this target
26+
#else
27+
2428
#include "mbed.h"
2529
#include "FATFileSystem.h"
2630
#include "LittleFileSystem.h"
@@ -30,10 +34,6 @@
3034
#include "common_defines_test.h"
3135
#include "file_test.h"
3236

33-
#if !INTEGRATION_TESTS
34-
#error [NOT_SUPPORTED] integration tests not enabled for this target
35-
#endif
36-
3737
#ifdef MBED_CONF_APP_BASICS_TEST_FILENAME
3838
#include MBED_CONF_APP_BASICS_TEST_FILENAME
3939
#else
@@ -162,3 +162,4 @@ int main()
162162

163163
return !Harness::run(specification);
164164
}
165+
#endif // !INTEGRATION_TESTS

TESTS/integration/fs-threaded/main.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
2222
*/
2323

24+
#if !INTEGRATION_TESTS
25+
#error [NOT_SUPPORTED] integration tests not enabled for this target
26+
#else
27+
2428
#include "mbed.h"
2529
#include "FATFileSystem.h"
2630
#include "LittleFileSystem.h"
@@ -30,10 +34,6 @@
3034
#include "common_defines_test.h"
3135
#include "file_test.h"
3236

33-
#if !INTEGRATION_TESTS
34-
#error [NOT_SUPPORTED] integration tests not enabled for this target
35-
#endif
36-
3737
#ifdef MBED_CONF_APP_BASICS_TEST_FILENAME
3838
#include MBED_CONF_APP_BASICS_TEST_FILENAME
3939
#else
@@ -181,3 +181,4 @@ int main()
181181

182182
return !Harness::run(specification);
183183
}
184+
#endif // !INTEGRATION_TESTS

TESTS/integration/net-single/main.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
2222
*/
2323

24+
#if !INTEGRATION_TESTS
25+
#error [NOT_SUPPORTED] integration tests not enabled for this target
26+
#else
27+
2428
#include "mbed.h"
2529
#include "utest/utest.h"
2630
#include "unity/unity.h"
@@ -29,10 +33,6 @@
2933
#include "download_test.h"
3034
#include <string>
3135

32-
#if !INTEGRATION_TESTS
33-
#error [NOT_SUPPORTED] integration tests not enabled for this target
34-
#endif
35-
3636
#ifdef MBED_CONF_APP_BASICS_TEST_FILENAME
3737
#include MBED_CONF_APP_BASICS_TEST_FILENAME
3838
#else
@@ -139,3 +139,4 @@ int main()
139139

140140
return !Harness::run(specification);
141141
}
142+
#endif // !INTEGRATION_TESTS

0 commit comments

Comments
 (0)