Skip to content

Commit b1731ce

Browse files
committed
-New PR for PSA,Netsocket,storage components,reverted all the changes to back to original
-Change the #error description more precisely -Separated the MBED_CONF_RTOS_PRESENT guarded
1 parent 302f595 commit b1731ce

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)

0 commit comments

Comments
 (0)