Skip to content

Commit 818c1d6

Browse files
author
Seppo Takalo
authored
Merge pull request #11130 from Tharazi97/NotSupportedTest
Updated testcases
2 parents 2ca8487 + ae6f8be commit 818c1d6

File tree

112 files changed

+444
-324
lines changed

Some content is hidden

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

112 files changed

+444
-324
lines changed

TESTS/events/queue/main.cpp

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

2323
#if !DEVICE_USTICKER
2424
#error [NOT_SUPPORTED] test not supported
25-
#endif
25+
#else
2626

2727
using namespace utest::v1;
2828

@@ -357,3 +357,4 @@ int main()
357357
return !Harness::run(specification);
358358
}
359359

360+
#endif // !DEVICE_USTICKER

TESTS/events/timing/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ using namespace utest::v1;
2626

2727
#if !DEVICE_USTICKER
2828
#error [NOT_SUPPORTED] test not supported
29-
#endif
29+
#else
3030

3131
// Test delay
3232
#ifndef TEST_EVENTS_TIMING_TIME
@@ -148,3 +148,4 @@ int main()
148148
return !Harness::run(specification);
149149
}
150150

151+
#endif // !DEVICE_USTICKER

TESTS/lorawan/loraradio/main.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#error [NOT_SUPPORTED] Requires parameters from application config file.
3737
#endif
3838

39+
#if (MBED_CONF_APP_LORA_RADIO == SX1272) || (MBED_CONF_APP_LORA_RADIO == SX1276)
3940

4041
using namespace utest::v1;
4142
using namespace mbed;
@@ -281,3 +282,5 @@ int main()
281282
{
282283
return !Harness::run(specification);
283284
}
285+
286+
#endif // (MBED_CONF_APP_LORA_RADIO == SX1272) || (MBED_CONF_APP_LORA_RADIO == SX1276)

TESTS/mbed-crypto/sanity/main.cpp

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

2020
#if ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C)))
2121
#error [NOT_SUPPORTED] Mbed Crypto is OFF - skipping.
22-
#endif
22+
#else
2323

2424
#include <stdio.h>
2525
#include "mbed.h"
@@ -460,3 +460,4 @@ int main(void)
460460
{
461461
return !Harness::run(specification);
462462
}
463+
#endif // ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C)))

TESTS/mbed_drivers/flashiap/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#if !DEVICE_FLASH
1919
#error [NOT_SUPPORTED] Flash API not supported for this target
20-
#endif
20+
#else
2121

2222
#include "utest/utest.h"
2323
#include "utest/utest_serial.h"
@@ -328,3 +328,5 @@ int main()
328328
{
329329
Harness::run(specification);
330330
}
331+
332+
#endif // !DEVICE_FLASH

TESTS/mbed_drivers/lp_ticker/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#if !DEVICE_LPTICKER
2323
#error [NOT_SUPPORTED] Low power ticker not supported for this target
24-
#endif
24+
#else
2525

2626
using utest::v1::Case;
2727

@@ -228,3 +228,5 @@ int main()
228228
{
229229
utest::v1::Harness::run(specification);
230230
}
231+
232+
#endif // !DEVICE_LPTICKER

TESTS/mbed_drivers/lp_timeout/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#if !DEVICE_LPTICKER
1818
#error [NOT_SUPPORTED] Low power timer not supported for this target
19-
#endif
19+
#else
2020

2121
#include "mbed.h"
2222
#include "greentea-client/test_env.h"
@@ -93,3 +93,5 @@ int main()
9393
{
9494
Harness::run(specification);
9595
}
96+
97+
#endif // !DEVICE_LPTICKER

TESTS/mbed_drivers/lp_timer/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#if !DEVICE_LPTICKER
2626
#error [NOT_SUPPORTED] test not supported
27-
#endif
27+
#else
2828

2929
using namespace utest::v1;
3030

@@ -350,3 +350,5 @@ int main()
350350
{
351351
return !Harness::run(specification);
352352
}
353+
354+
#endif // !DEVICE_LPTICKER

TESTS/mbed_drivers/mem_trace/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#ifndef MBED_MEM_TRACING_ENABLED
2828
#error [NOT_SUPPORTED] test not supported
29-
#endif
29+
#else
3030

3131
using utest::v1::Case;
3232

@@ -427,3 +427,5 @@ int main()
427427

428428
return !utest::v1::Harness::run(specification);
429429
}
430+
431+
#endif // MBED_MEM_TRACING_ENABLED

TESTS/mbed_drivers/race_test/main.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,9 @@
2222
#include "SingletonPtr.h"
2323
#include <stdio.h>
2424

25-
#ifdef MBED_RTOS_SINGLE_THREAD
26-
#error [NOT_SUPPORTED] test not supported for single threaded enviroment
27-
#endif
28-
29-
#if !DEVICE_USTICKER
30-
#error [NOT_SUPPORTED] test not supported
31-
#endif
25+
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
26+
#error [NOT_SUPPORTED] Test not supported for single threaded enviroment. UsTicker need to be enabled for this test.
27+
#else
3228

3329
using namespace utest::v1;
3430

@@ -135,3 +131,5 @@ int main()
135131
{
136132
Harness::run(specification);
137133
}
134+
135+
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER

TESTS/mbed_drivers/reset_reason/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
#if !DEVICE_RESET_REASON
1818
#error [NOT_SUPPORTED] Reset reason API not supported for this target
19-
#endif
19+
#else
2020

2121
#include "greentea-client/test_env.h"
2222
#include "unity/unity.h"
@@ -141,3 +141,5 @@ int main()
141141
test_reset_reason(); // The result of this test suite is reported by the host side.
142142
GREENTEA_TESTSUITE_RESULT(0); // Fail on any error.
143143
}
144+
145+
#endif // !DEVICE_RESET_REASON

TESTS/mbed_drivers/rtc/main.cpp

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

2424
#if !DEVICE_RTC || !DEVICE_USTICKER
2525
#error [NOT_SUPPORTED] test not supported
26-
#endif
26+
#else
2727

2828
using namespace utest::v1;
2929

@@ -494,3 +494,5 @@ int main()
494494
{
495495
return !Harness::run(specification);
496496
}
497+
498+
#endif // !DEVICE_RTC || !DEVICE_USTICKER

TESTS/mbed_drivers/sleep_lock/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#if !DEVICE_SLEEP
1919
#error [NOT_SUPPORTED] Sleep not supported for this target
20-
#endif
20+
#else
2121

2222
#include "utest/utest.h"
2323
#include "unity/unity.h"
@@ -132,3 +132,5 @@ int main()
132132
{
133133
Harness::run(specification);
134134
}
135+
136+
#endif // !DEVICE_SLEEP

TESTS/mbed_drivers/ticker/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#if !DEVICE_USTICKER
2222
#error [NOT_SUPPORTED] test not supported
23-
#endif
23+
#else
2424

2525
using utest::v1::Case;
2626

@@ -354,3 +354,5 @@ int main()
354354
{
355355
utest::v1::Harness::run(specification);
356356
}
357+
358+
#endif // !DEVICE_USTICKER

TESTS/mbed_drivers/timeout/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#if !DEVICE_USTICKER
2323
#error [NOT_SUPPORTED] usticker not supported for this target.
24-
#endif
24+
#else
2525

2626
using namespace utest::v1;
2727

@@ -87,3 +87,5 @@ int main()
8787
{
8888
Harness::run(specification);
8989
}
90+
91+
#endif // !DEVICE_USTICKER

TESTS/mbed_drivers/timer/main.cpp

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

2525
#if !DEVICE_USTICKER
2626
#error [NOT_SUPPORTED] test not supported
27-
#endif
27+
#else
2828

2929
using namespace utest::v1;
3030

@@ -789,3 +789,4 @@ int main()
789789
return !Harness::run(specification);
790790
}
791791

792+
#endif // !DEVICE_USTICKER

TESTS/mbed_drivers/timerevent/main.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
#if !DEVICE_USTICKER
1717
#error [NOT_SUPPORTED] usticker not supported for this target.
18-
#endif
18+
#else
1919

2020
#include "mbed.h"
2121
#include "greentea-client/test_env.h"
@@ -27,10 +27,6 @@
2727

2828
using namespace utest::v1;
2929

30-
#if !DEVICE_USTICKER
31-
#error [NOT_SUPPORTED] test not supported
32-
#endif
33-
3430
#define TEST_DELAY_US 50000ULL
3531
#define DELTA 2
3632

@@ -246,3 +242,5 @@ int main()
246242
{
247243
return !Harness::run(specification);
248244
}
245+
246+
#endif // !DEVICE_USTICKER

TESTS/mbed_drivers/watchdog/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
#if !DEVICE_WATCHDOG
1818
#error [NOT_SUPPORTED] Watchdog not supported for this target
19-
#endif
19+
#else
2020

2121
#include "greentea-client/test_env.h"
2222
#include "unity/unity.h"
@@ -282,3 +282,5 @@ int main()
282282
// Harness will start with a test case index provided by host script.
283283
return !Harness::run(specification);
284284
}
285+
286+
#endif // !DEVICE_WATCHDOG

TESTS/mbed_drivers/watchdog_reset/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
#if !DEVICE_WATCHDOG
1818
#error [NOT_SUPPORTED] Watchdog not supported for this target
19-
#endif
19+
#else
2020

2121
#include "greentea-client/test_env.h"
2222
#include "utest/utest.h"
@@ -319,3 +319,4 @@ int main()
319319
// Harness will start with a test case index provided by host script.
320320
return !Harness::run(specification);
321321
}
322+
#endif // !DEVICE_WATCHDOG

TESTS/mbed_hal/common_tickers/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ extern "C" {
3232

3333
#if !DEVICE_USTICKER
3434
#error [NOT_SUPPORTED] test not supported
35-
#endif
35+
#else
3636

3737
#define US_PER_S 1000000
3838

@@ -605,3 +605,4 @@ int main()
605605
{
606606
return !Harness::run(specification);
607607
}
608+
#endif // !DEVICE_USTICKER

TESTS/mbed_hal/common_tickers_freq/main.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,9 @@
3030
#include "hal/lp_ticker_api.h"
3131
#include "hal/mbed_lp_ticker_wrapper.h"
3232

33-
#if defined(SKIP_TIME_DRIFT_TESTS)
33+
#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
3434
#error [NOT_SUPPORTED] test not supported
35-
#endif
36-
37-
#if !DEVICE_USTICKER
38-
#error [NOT_SUPPORTED] test not supported
39-
#endif
35+
#else
4036

4137
#define US_PER_S 1000000
4238

@@ -208,3 +204,5 @@ int main()
208204
{
209205
Harness::run(specification);
210206
}
207+
208+
#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER

TESTS/mbed_hal/crc/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#if !DEVICE_CRC
2424
#error [NOT_SUPPORTED] CRC not supported for this target
25-
#endif
25+
#else
2626

2727
using namespace utest::v1;
2828

@@ -280,3 +280,5 @@ int main()
280280

281281
Harness::run(specification);
282282
}
283+
284+
#endif // !DEVICE_CRC

TESTS/mbed_hal/flash/functional_tests/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#if !DEVICE_FLASH
1818
#error [NOT_SUPPORTED] Flash API not supported for this target
19-
#endif
19+
#else
2020

2121
#include "utest/utest.h"
2222
#include "unity/unity.h"
@@ -280,3 +280,5 @@ int main()
280280
{
281281
Harness::run(specification);
282282
}
283+
284+
#endif !DEVICE_FLASH

TESTS/mbed_hal/lp_ticker/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#if !DEVICE_LPTICKER
2626
#error [NOT_SUPPORTED] Low power timer not supported for this target
27-
#endif
27+
#else
2828

2929
using namespace utest::v1;
3030

@@ -204,3 +204,5 @@ int main()
204204
{
205205
return !Harness::run(specification);
206206
}
207+
208+
#endif // !DEVICE_LPTICKER

TESTS/mbed_hal/mpu/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#if !DEVICE_MPU
2828
#error [NOT_SUPPORTED] MPU API not supported for this target
29-
#endif
29+
#else
3030

3131
using namespace utest::v1;
3232

@@ -197,3 +197,5 @@ int main()
197197
{
198198
Harness::run(specification);
199199
}
200+
201+
#endif // !DEVICE_MPU

0 commit comments

Comments
 (0)