Skip to content

Commit 302f595

Browse files
committed
- Emac,NFC-EEPROM,PSA-CRYPTO components build issue fixed
- RTOS supported test case guarded with MBED_CONF_RTOS_PRESENT flag - Added the #error to non supported test case for bare metal
1 parent 3fc8905 commit 302f595

File tree

152 files changed

+513
-156
lines changed

Some content is hidden

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

152 files changed

+513
-156
lines changed

TESTS/configs/baremetal.json

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,30 @@
1111
"filesystem",
1212
"littlefs",
1313
"mbed-trace",
14-
"device-key",
15-
"lora"
16-
]
14+
"device_key",
15+
"storage_tdb_internal",
16+
"storage_filesystem",
17+
"storage_tdb_external",
18+
"lora",
19+
"nfc",
20+
"network-emac",
21+
"nanostack-libservice",
22+
"flashiap-block-device",
23+
"system-storage",
24+
"filesystemstore",
25+
"SecureStore",
26+
"storage",
27+
"kv-map",
28+
"direct-access-devicekey",
29+
"tdbstore",
30+
"kv-config",
31+
"events",
32+
"kv-global-api",
33+
"sd"
34+
],
35+
"target_overrides": {
36+
"*": {
37+
"target.device_has_remove": ["EMAC", "USBDEVICE"]
38+
}
39+
}
1740
}

TESTS/events/queue/main.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
*/
1616
#include "mbed_events.h"
1717
#include "mbed.h"
18+
#if defined(MBED_CONF_RTOS_PRESENT)
1819
#include "rtos.h"
20+
#endif
21+
1922
#include "greentea-client/test_env.h"
2023
#include "unity.h"
2124
#include "utest.h"

TESTS/events/timing/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
*/
1616
#include "mbed_events.h"
1717
#include "mbed.h"
18+
#if defined(MBED_CONF_RTOS_PRESENT)
1819
#include "rtos.h"
20+
#endif
1921
#include "greentea-client/test_env.h"
2022
#include "unity.h"
2123
#include "utest.h"
@@ -84,6 +86,7 @@ void timer_timing_test()
8486
// equeue tick timing test
8587
void tick_timing_test()
8688
{
89+
#if defined(MBED_CONF_RTOS_PRESENT)
8790
unsigned start = equeue_tick();
8891
int prev = 0;
8992

@@ -96,11 +99,13 @@ void tick_timing_test()
9699
TEST_ASSERT(next >= prev);
97100
prev = next;
98101
}
102+
#endif
99103
}
100104

101105
// equeue semaphore timing test
102106
void semaphore_timing_test()
103107
{
108+
#if defined(MBED_CONF_RTOS_PRESENT)
104109
srand(0);
105110
timer.reset();
106111
timer.start();
@@ -125,6 +130,7 @@ void semaphore_timing_test()
125130
}
126131

127132
equeue_sema_destroy(&sema);
133+
#endif
128134
}
129135

130136

TESTS/integration/COMMON/download_test.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
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-
#endif
24+
#if INTEGRATION_TESTS
2725

2826
#include "mbed.h"
2927
#include "unity/unity.h"
@@ -206,4 +204,4 @@ size_t download_test(NetworkInterface *interface, const unsigned char *data, siz
206204

207205
return received_bytes;
208206
}
209-
207+
#endif // INTEGRATION_TESTS

TESTS/integration/COMMON/download_test.h

Lines changed: 2 additions & 1 deletion
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-
23+
#if INTEGRATION_TESTS
2424
size_t download_test(NetworkInterface *interface, const unsigned char *data, size_t data_length, size_t buff_size, uint32_t thread_id = 0);
25+
#endif
2526

TESTS/integration/COMMON/file_test.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +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
24-
#error [NOT_SUPPORTED] integration tests not enabled for this target
25-
#endif
23+
#if INTEGRATION_TESTS
2624

2725
#include "mbed.h"
2826
#include "unity/unity.h"
@@ -106,3 +104,4 @@ void file_test_read(const char *file, size_t offset, const unsigned char *data,
106104
float(data_length) / 1024, float(data_length) / timer.read() / 1024, timer.read());
107105
}
108106

107+
#endif //#if INTEGRATION_TESTS

TESTS/integration/COMMON/file_test.h

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

2626
void file_test_read(const char *file, size_t offset, const unsigned char *data, size_t data_length, size_t block_size);
27+
#endif

TESTS/integration/fs-single/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#if !INTEGRATION_TESTS
2525
#error [NOT_SUPPORTED] integration tests not enabled for this target
26-
#endif
26+
#else
2727

2828
#include "mbed.h"
2929
#include "FATFileSystem.h"
@@ -162,3 +162,4 @@ int main()
162162

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

TESTS/integration/fs-threaded/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#if !INTEGRATION_TESTS
2525
#error [NOT_SUPPORTED] integration tests not enabled for this target
26-
#endif
26+
#else
2727

2828
#include "mbed.h"
2929
#include "FATFileSystem.h"
@@ -181,3 +181,4 @@ int main()
181181

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

TESTS/integration/net-single/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#if !INTEGRATION_TESTS
2525
#error [NOT_SUPPORTED] integration tests not enabled for this target
26-
#endif
26+
#else
2727

2828
#include "mbed.h"
2929
#include "utest/utest.h"
@@ -139,3 +139,4 @@ int main()
139139

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

0 commit comments

Comments
 (0)