Skip to content

Commit e2e8b37

Browse files
committed
-PSA,Netsocket,storage Green tea test for bare metal changes
raise as separe PRs -Change the #error description -Changed to MBED_CONF_RTOS_PRESENT to beginning on file to check
1 parent 9297192 commit e2e8b37

File tree

111 files changed

+144
-307
lines changed

Some content is hidden

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

111 files changed

+144
-307
lines changed

TESTS/lorawan/loraradio/main.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
#if !defined(MBED_CONF_RTOS_PRESENT)
17-
#error [NOT_SUPPORTED] LORADIO tests are not enabled for Bare Metal.
18-
#else
1916

2017
#include "utest.h"
2118
#include "unity.h"
@@ -287,4 +284,3 @@ int main()
287284
}
288285

289286
#endif // (MBED_CONF_APP_LORA_RADIO == SX1272) || (MBED_CONF_APP_LORA_RADIO == SX1276)
290-
#endif // !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbed_drivers/lp_timeout/main.cpp

Lines changed: 6 additions & 2 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_CONF_RTOS_PRESENT)
17+
#error [NOT_SUPPORTED] Low power timer test cases requires RTOS to run.
18+
#else
1619

17-
#if !DEVICE_LPTICKER || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] Low power timer test cases are not supported.
20+
#if !DEVICE_LPTICKER
21+
#error [NOT_SUPPORTED] Low power timer not supported for this target
1922
#else
2023

2124
#include "mbed.h"
@@ -95,3 +98,4 @@ int main()
9598
}
9699

97100
#endif // !DEVICE_LPTICKER
101+
#endif //!defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbed_drivers/timeout/main.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,19 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
17+
#if !defined(MBED_CONF_RTOS_PRESENT)
18+
#error [NOT_SUPPORTED] usticker test requires RTOS to run.
19+
#else
20+
1621
#include "mbed.h"
1722
#include "greentea-client/test_env.h"
1823
#include "utest/utest.h"
1924
#include "unity/unity.h"
2025
#include "timeout_tests.h"
2126

22-
#if !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
23-
#error [NOT_SUPPORTED] usticker test not supported.
27+
#if !DEVICE_USTICKER
28+
#error [NOT_SUPPORTED] usticker not supported for this target.
2429
#else
2530

2631
using namespace utest::v1;
@@ -89,3 +94,4 @@ int main()
8994
}
9095

9196
#endif // !DEVICE_USTICKER
97+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbed_drivers/timerevent/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616
#if !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
17-
#error [NOT_SUPPORTED] usticker test not supported.
17+
#error [NOT_SUPPORTED] usticker test case requires RTOS to run and also usticker needs to be enabled for this target.
1818
#else
1919

2020
#include "mbed.h"

TESTS/mbed_drivers/watchdog/main.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
#if !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] Watchdo test not supported.
17+
18+
#if !defined(MBED_CONF_RTOS_PRESENT)
19+
#error [NOT_SUPPORTED] Watchdog test cases requires RTOS to run.
20+
#else
21+
22+
#if !DEVICE_WATCHDOG
23+
#error [NOT_SUPPORTED] Watchdog not supported for this target
1924
#else
2025

2126
#include "greentea-client/test_env.h"
@@ -284,3 +289,4 @@ int main()
284289
}
285290

286291
#endif // !DEVICE_WATCHDOG
292+
#endif // !defined(MBED_CONG_RTOS_PRESENT)

TESTS/mbed_drivers/watchdog_reset/main.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
#if !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] Watchdog reset test not supported.
17+
#if !defined(MBED_CONF_RTOS_PRESENT)
18+
#error [NOT_SUPPORTED] Watchdog reset test cases requires RTOS to run.
19+
#else
20+
21+
#if !DEVICE_WATCHDOG
22+
#error [NOT_SUPPORTED] Watchdog not supported for this target
1923
#else
2024

2125
#include "greentea-client/test_env.h"
@@ -334,3 +338,4 @@ int main()
334338
return !Harness::run(specification);
335339
}
336340
#endif // !DEVICE_WATCHDOG
341+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbed_hal/common_tickers/main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17-
#if !DEVICE_USTICKER || !defined(MBED_RTOS_CONF_PRESENT)
18-
#error [NOT_SUPPORTED] test not supported
17+
#if !defined(MBED_RTOS_CONF_PRESENT)
18+
#error [NOT_SUPPORTED] usticker test cases requires RTOS to run
1919
#else
2020

2121
#include "mbed.h"
@@ -35,6 +35,9 @@ extern "C" {
3535
}
3636
#endif // __cplusplus
3737

38+
#if !DEVICE_USTICKER
39+
#error [NOT_SUPPORTED] test not supported
40+
#else
3841

3942
#define US_PER_S 1000000
4043

@@ -607,4 +610,5 @@ int main()
607610
{
608611
return !Harness::run(specification);
609612
}
610-
#endif // !DEVICE_USTICKER || !defined(MBED_RTOS_CONF_PRESENT)
613+
#endif // !DEVICE_USTICKER
614+
#endif // !defined(MBED_RTOS_CONF_PRESENT)

TESTS/mbed_hal/common_tickers_freq/main.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
* freqency is valid.
2121
*/
2222

23+
#if !defined(MBED_CONF_RTOS_PRESENT)
24+
#error [NOT_SUPPORTED] common tickers frequency test cases requires RTOS to run.
25+
#else
2326

2427
#include "mbed.h"
2528
#include "greentea-client/test_env.h"
@@ -30,7 +33,7 @@
3033
#include "hal/lp_ticker_api.h"
3134
#include "hal/mbed_lp_ticker_wrapper.h"
3235

33-
#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
36+
#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
3437
#error [NOT_SUPPORTED] test not supported
3538
#else
3639

@@ -205,4 +208,5 @@ int main()
205208
Harness::run(specification);
206209
}
207210

208-
#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER || !defined(MBED_RTOS_CONF_PRESENT)
211+
#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
212+
#endif // !defined(MBED_RTOS_CONF_PRESENT)

TESTS/mbed_hal/lp_ticker/main.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17-
#if !DEVICE_LPTICKER || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] Low power timer test not supported.
17+
#if !defined(MBED_CONF_RTOS_PRESENT)
18+
#error [NOT_SUPPORTED] Low power timer test cases requires RTOS to run.
1919
#else
2020

2121
#include "mbed.h"
@@ -28,7 +28,9 @@
2828
#include "hal/mbed_lp_ticker_wrapper.h"
2929
#include "hal/us_ticker_api.h"
3030

31-
31+
#if !DEVICE_LPTICKER
32+
#error [NOT_SUPPORTED] Low power timer not supported for this target
33+
#else
3234

3335
using namespace utest::v1;
3436

@@ -209,4 +211,5 @@ int main()
209211
return !Harness::run(specification);
210212
}
211213

212-
#endif // !DEVICE_LPTICKER || !defined(MBED_CONF_RTOS_PRESENT)
214+
#endif // !DEVICE_LPTICKER
215+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbed_hal/sleep/main.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
#if !DEVICE_SLEEP || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] sleep not supported for this target and also for bare metal.
17+
#if !defined(MBED_CONF_RTOS_PRESENT)
18+
#error [NOT_SUPPORTED] sleep test cases requires RTOS to run.
19+
#else
20+
21+
#if !DEVICE_SLEEP
22+
#error [NOT_SUPPORTED] sleep not supported for this target
1923
#else
2024

2125
#include "mbed.h"
@@ -262,4 +266,5 @@ int main()
262266
Harness::run(specification);
263267
}
264268

265-
#endif // !DEVICE_SLEEP || !defined(MBED_CONF_RTOS_PRESENT)
269+
#endif // !DEVICE_SLEEP
270+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbed_hal/sleep_manager/main.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#if !defined(MBED_CONF_RTOS_PRESENT)
17+
#error [NOT_SUPPORTED] sleep manager test cases requires RTOS to run.
18+
#else
19+
1620
#include "utest/utest.h"
1721
#include "unity/unity.h"
1822
#include "greentea-client/test_env.h"
@@ -23,7 +27,7 @@
2327
#include "../sleep/sleep_test_utils.h"
2428
#include "sleep_manager_api_tests.h"
2529

26-
#if !DEVICE_SLEEP || !defined(MBED_CONF_RTOS_PRESENT)
30+
#if !DEVICE_SLEEP
2731
#error [NOT_SUPPORTED] test not supported
2832
#else
2933

@@ -335,4 +339,5 @@ int main()
335339
return !Harness::run(specification);
336340
}
337341

338-
#endif // !DEVICE_SLEEP || !defined(MBED_CONF_RTOS_PRESENT)
342+
#endif // !DEVICE_SLEEP
343+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbed_hal/stack_size_unification/main.cpp

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

23-
#if defined(TARGET_RENESAS) || !defined(MBED_CONF_RTOS_PRESENT)
24-
#error [NOT_SUPPORTED] Cortex-A target and bare metal not supported for this test
27+
#ifdef TARGET_RENESAS
28+
#error [NOT_SUPPORTED] Cortex-A target not supported for this test
2529
#else
2630

2731
using namespace utest::v1;
@@ -75,4 +79,5 @@ int main()
7579
return !Harness::run(specification);
7680
}
7781

78-
#endif // TARGET_RENESAS || !defined(MBED_CONF_RTOS_PRESENT)
82+
#endif // TARGET_RENESAS
83+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbed_hal/watchdog/main.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
#if !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] Watchdog test not supported.
17+
#if !defined(MBED_CONF_RTOS_PRESENT)
18+
#error [NOT_SUPPORTED] Watchdog test cases requires RTOS to run.
19+
#else
20+
21+
#if !DEVICE_WATCHDOG
22+
#error [NOT_SUPPORTED] Watchdog not supported for this target
1923
#else
2024

2125
#include "greentea-client/test_env.h"
@@ -284,4 +288,5 @@ int main()
284288
return !Harness::run(specification);
285289
}
286290

287-
#endif // !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT)
291+
#endif // !DEVICE_WATCHDOG
292+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbed_hal/watchdog_reset/main.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
#if !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT)
18-
#error [NOT_SUPPORTED] Watchdog test not supported.
17+
#if !defined(MBED_CONF_RTOS_PRESENT)
18+
#error [NOT_SUPPORTED] Watchdog reset test cases requires RTOS to run.
19+
#else
20+
21+
#if !DEVICE_WATCHDOG
22+
#error [NOT_SUPPORTED] Watchdog not supported for this target
1923
#else
2024

2125
#include "greentea-client/test_env.h"
@@ -320,4 +324,5 @@ int main()
320324
return !Harness::run(specification);
321325
}
322326

323-
#endif // !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT)
327+
#endif // !DEVICE_WATCHDOG
328+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

TESTS/mbed_platform/crash_reporting/main.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,19 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
#if !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED || !defined(MBED_CONF_RTOS_PRESENT)
17-
#error [NOT_SUPPORTED] crash_reporting test not supported
16+
#if !defined(MBED_CONF_RTOS_PRESENT)
17+
#error [NOT_SUPPORTED] crash_reporting test cases requires RTOS to run.
1818
#else
19-
2019
#include "mbed.h"
2120
#include "mbed_error.h"
2221
#include "mbed_crash_data_offsets.h"
2322
#include "greentea-client/test_env.h"
2423
#include "unity/unity.h"
2524

25+
#if !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED
26+
#error [NOT_SUPPORTED] crash_reporting test not supported
27+
#else
28+
2629
#define MSG_VALUE_DUMMY "0"
2730
#define MSG_VALUE_LEN 32
2831
#define MSG_KEY_LEN 64
@@ -79,4 +82,5 @@ int main(void)
7982
return 0;
8083
}
8184

82-
#endif // !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED || !defined(MBED_CONF_RTOS_PRESENT)
85+
#endif // !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED
86+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "utest.h"
2020

2121
#if !defined(MBED_CONF_RTOS_PRESENT)
22-
#error [NOT_SUPPORTED] test not supported
22+
#error [NOT_SUPPORTED] MemoryPool test cases requires RTOS to run.
2323
#else
2424

2525
using namespace utest::v1;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616
#if !defined(MBED_CONF_RTOS_PRESENT)
17-
#error [NOT_SUPPORTED] test not supported
17+
#error [NOT_SUPPORTED] kernel tick count test cases requires RTOS to run.
1818
#else
1919

2020
#include "greentea-client/test_env.h"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "utest.h"
2121
#include "ticker_api.h"
2222
#if !defined(MBED_CONF_RTOS_PRESENT)
23-
#error [NOT_SUPPORTED] test not supported
23+
#error [NOT_SUPPORTED] systimer test cases requires RTOS to run.
2424
#else
2525

2626
extern "C" {

TESTS/mbedtls/selftest/main.cpp

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

2523
using namespace utest::v1;
2624

TESTS/netsocket/dns/asynchronous_dns.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
* limitations under the License.
1616
*/
1717

18-
#if defined(MBED_CONF_RTOS_PRESENT)
19-
2018
#include "mbed.h"
2119
#include "greentea-client/test_env.h"
2220
#include "unity.h"
@@ -42,4 +40,3 @@ void ASYNCHRONOUS_DNS()
4240
TEST_ASSERT_EQUAL(0, result_dns_failure);
4341
TEST_ASSERT_EQUAL(0, result_exp_timeout);
4442
}
45-
#endif

0 commit comments

Comments
 (0)