Skip to content

Commit 9e994cf

Browse files
committed
Incorporated review comments
1 parent 74d1939 commit 9e994cf

File tree

23 files changed

+93
-46
lines changed

23 files changed

+93
-46
lines changed

TESTS/integration/COMMON/download_test.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,5 @@
2020
/*
2121
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
2222
*/
23-
#if INTEGRATION_TESTS
2423
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
2624

TESTS/integration/COMMON/file_test.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
/*
2121
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
2222
*/
23-
#if INTEGRATION_TESTS
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);
27-
#endif

TESTS/integration/fs-single/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,4 @@ int main()
162162

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

TESTS/integration/fs-threaded/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,4 @@ int main()
181181

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

TESTS/integration/net-single/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@ int main()
139139

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

TESTS/integration/net-threaded/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,4 @@ int main()
173173

174174
return !Harness::run(specification);
175175
}
176-
#endif
176+
#endif // !INTEGRATION_TESTS

TESTS/integration/stress-net-fs/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,4 @@ int main()
244244

245245
return !Harness::run(specification);
246246
}
247-
#endif
247+
#endif // !INTEGRATION_TESTS

TESTS/mbed_drivers/race_test/main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
18+
#error [NOT_SUPPORTED] Race test test cases require RTOS with multithread to run
19+
#else
1720

18-
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
19-
#error [NOT_SUPPORTED] Test not supported for single threaded and also bare metal enviroment. UsTicker need to be enabled for this test.
21+
#if !DEVICE_USTICKER
22+
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
2023
#else
2124

2225
#include "mbed.h"
@@ -133,4 +136,5 @@ int main()
133136
Harness::run(specification);
134137
}
135138

136-
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
139+
#endif // !DEVICE_USTICKER
140+
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_THREAD)

TESTS/mbedmicro-rtos-mbed/basic/main.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
18+
#error [NOT_SUPPORTED] RTOS basic test cases require RTOS with multithread to run
19+
#else
20+
1721
#include "mbed.h"
1822
#include "greentea-client/test_env.h"
1923
#include "utest/utest.h"
2024
#include "unity/unity.h"
2125

22-
#if defined(SKIP_TIME_DRIFT_TESTS) || defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
23-
#error [NOT_SUPPORTED] test not supported
26+
#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
27+
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
2428
#else
2529

2630
using utest::v1::Case;
@@ -116,4 +120,5 @@ int main()
116120
utest::v1::Harness::run(specification);
117121
}
118122

119-
#endif // defined(SKIP_TIME_DRIFT_TESTS) || defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
123+
#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
124+
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbedmicro-rtos-mbed/condition_variable/main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
17+
#error [NOT_SUPPORTED] Condition variable test cases require RTOS with multithread to run
18+
#else
1619

17-
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] test not supported
20+
#if !DEVICE_USTICKER
21+
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
1922
#else
2023

2124
#include "mbed.h"
@@ -186,4 +189,5 @@ int main()
186189
return !Harness::run(specification);
187190
}
188191

189-
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
192+
#endif // !DEVICE_USTICKER
193+
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbedmicro-rtos-mbed/event_flags/main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
18+
#error [NOT_SUPPORTED] Event flags test cases require RTOS with multithread to run
19+
#else
1720

1821
#include "mbed.h"
1922
#include "greentea-client/test_env.h"
@@ -22,8 +25,8 @@
2225

2326
using utest::v1::Case;
2427

25-
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
26-
#error [NOT_SUPPORTED] test not supported
28+
#if !DEVICE_USTICKER
29+
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
2730
#else
2831

2932
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
@@ -371,4 +374,5 @@ int main()
371374
return !utest::v1::Harness::run(specification);
372375
}
373376

374-
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
377+
#endif // !DEVICE_USTICKER
378+
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbedmicro-rtos-mbed/mail/main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
17+
#error [NOT_SUPPORTED] mail test cases require RTOS with multithread to run
18+
#else
1619

17-
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] test not supported
20+
#if !DEVICE_USTICKER
21+
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
1922
#else
2023

2124
#include "mbed.h"
@@ -510,4 +513,5 @@ int main()
510513
return !Harness::run(specification);
511514
}
512515

513-
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
516+
#endif // !DEVICE_USTICKER
517+
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbedmicro-rtos-mbed/mutex/main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
17+
#error [NOT_SUPPORTED] Mutex test cases require RTOS with multithread to run
18+
#else
1619

17-
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] test not supported
20+
#if !DEVICE_USTICKER
21+
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
1922
#else
2023

2124
#include "mbed.h"
@@ -306,4 +309,5 @@ int main()
306309
return !Harness::run(specification);
307310
}
308311

309-
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
312+
#endif // !DEVICE_USTICKER
313+
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbedmicro-rtos-mbed/queue/main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
17+
#error [NOT_SUPPORTED] Queue test cases require RTOS with multithread to run
18+
#else
1619

17-
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] test not supported
20+
#if !DEVICE_USTICKER
21+
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
1922
#else
2023

2124
#include "mbed.h"
@@ -346,4 +349,5 @@ int main()
346349
return !Harness::run(specification);
347350
}
348351

349-
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
352+
#endif // !DEVICE_USTICKER
353+
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbedmicro-rtos-mbed/rtostimer/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#if !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] test not supported
18+
#error [NOT_SUPPORTED] RTOS timer test cases require RTOS to run
1919
#else
2020

2121
#include "mbed.h"

TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
17+
#error [NOT_SUPPORTED] Semaphore test cases require RTOS with multithread to run
18+
#else
1619

17-
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] test not supported
20+
#if !DEVICE_USTICKER
21+
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
1922
#else
2023

2124
#include "mbed.h"
@@ -247,4 +250,5 @@ int main()
247250
return !Harness::run(specification);
248251
}
249252

250-
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
253+
#endif // !DEVICE_USTICKER
254+
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbedmicro-rtos-mbed/signals/main.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,19 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
17+
#error [NOT_SUPPORTED] Signals test cases require RTOS with multithread to run
18+
#else
19+
1620
#include "mbed.h"
1721
#include "greentea-client/test_env.h"
1822
#include "utest/utest.h"
1923
#include "unity/unity.h"
2024

2125
using utest::v1::Case;
2226

23-
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
24-
#error [NOT_SUPPORTED] test not supported
27+
#if !DEVICE_USTICKER
28+
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
2529
#else
2630

2731
#define TEST_STACK_SIZE 512
@@ -393,4 +397,5 @@ int main()
393397
return !utest::v1::Harness::run(specification);
394398
}
395399

396-
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
400+
#endif // !DEVICE_USTICKER
401+
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbedmicro-rtos-mbed/systimer/main.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
#include "unity.h"
2020
#include "utest.h"
2121
#include "ticker_api.h"
22-
#if !defined(MBED_CONF_RTOS_PRESENT)
23-
#error [NOT_SUPPORTED] systimer test cases requires RTOS to run.
24-
#else
2522

23+
#if defined(MBED_CONF_RTOS_PRESENT)
2624
extern "C" {
2725
#include "rtx_lib.h"
2826
}
27+
#endif
28+
2929
#include "platform/source/SysTimer.h"
3030

3131
#define TEST_TICKS 42
@@ -354,4 +354,3 @@ int main()
354354
{
355355
return !Harness::run(specification);
356356
}
357-
#endif

TESTS/mbedmicro-rtos-mbed/threads/main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
17+
#error [NOT_SUPPORTED] Threads test cases require RTOS with multithread to run
18+
#else
1619

17-
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] test not supported
20+
#if !DEVICE_USTICKER
21+
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
1922
#else
2023

2124
#include "mbed.h"
@@ -848,4 +851,5 @@ int main()
848851
return !Harness::run(specification);
849852
}
850853

851-
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
854+
#endif // !DEVICE_USTICKER
855+
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

TESTS/usb_device/basic/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
#if !defined(MBED_CONF_RTOS_PRESENT)
19-
#error [NOT_SUPPORTED] USB test cases requires RTOS to run.
19+
#error [NOT_SUPPORTED] USB stack and test cases require RTOS to run.
2020
#else
2121

2222
#include <stdio.h>

TESTS/usb_device/hid/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
#if !defined(MBED_CONF_RTOS_PRESENT)
18+
#error [NOT_SUPPORTED] USB stack and test cases require RTOS to run.
19+
#else
20+
1721
#if !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE
1822
#error [NOT_SUPPORTED] USB Device not supported for this target
1923
#else
@@ -385,3 +389,4 @@ int main()
385389
}
386390

387391
#endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE
392+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

TESTS/usb_device/msd/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
#if !defined(MBED_CONF_RTOS_PRESENT)
19-
#error [NOT_SUPPORTED] USB test cases are not supported on Bare metal
19+
#error [NOT_SUPPORTED] USB stack and test cases require RTOS to run.
2020
#else
2121

2222
#include <stdio.h>

TESTS/usb_device/serial/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
#if !defined(MBED_CONF_RTOS_PRESENT)
18+
#error [NOT_SUPPORTED] USB stack and test cases require RTOS to run.
19+
#else
20+
1721
#if !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE
1822
#error [NOT_SUPPORTED] USB Device not supported for this target
1923
#else
@@ -848,3 +852,4 @@ int main()
848852
}
849853

850854
#endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE
855+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

0 commit comments

Comments
 (0)