Skip to content

Commit e78943e

Browse files
author
Cruz Monrreal
authored
Merge pull request #7159 from juhaylinen/greentea_mtb_emac
Add targets to Greentea EMAC tests
2 parents de99c0f + 44ce63e commit e78943e

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

TESTS/network/emac/emac_test_initialize.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,17 @@
3232

3333
#if MBED_CONF_APP_TEST_WIFI
3434

35-
#ifdef TARGET_UBLOX_EVK_ODIN_W2
35+
#if defined(TARGET_UBLOX_EVK_ODIN_W2) || defined(TARGET_MTB_UBLOX_ODIN_W2)
3636
#include "OdinWiFiInterface.h"
3737
#endif
3838
#ifdef TARGET_REALTEK_RTL8195AM
3939
#include "RTWInterface.h"
4040
#endif
41+
#if defined(TARGET_MTB_ADV_WISE_1530) || \
42+
defined(TARGET_MTB_USI_WM_BN_BM_22) || \
43+
defined(TARGET_MTB_MXCHIP_EMW3166)
44+
#include "WicedInterface.h"
45+
#endif
4146

4247
#endif
4348

@@ -61,10 +66,14 @@ void test_emac_initialize()
6166
#elif MBED_CONF_APP_TEST_WIFI
6267

6368
// Add wifi classes here
64-
#ifdef TARGET_UBLOX_EVK_ODIN_W2
69+
#if defined(TARGET_UBLOX_EVK_ODIN_W2) || defined(TARGET_MTB_UBLOX_ODIN_W2)
6570
static WiFiInterface *network_interface = new OdinWiFiInterface;
66-
#elif TARGET_REALTEK_RTL8195AM
71+
#elif defined(TARGET_REALTEK_RTL8195AM)
6772
static WiFiInterface *network_interface = new RTWInterface;
73+
#elif defined(TARGET_MTB_ADV_WISE_1530) || \
74+
defined(TARGET_MTB_USI_WM_BN_BM_22) || \
75+
defined(TARGET_MTB_MXCHIP_EMW3166)
76+
static WiFiInterface *network_interface = new WicedInterface;
6877
#else
6978
static WiFiInterface *network_interface = new WiFiInterface;
7079
#endif

TESTS/network/emac/main.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@
3333
#error [NOT_SUPPORTED] Both wifi and ethernet testing cannot be enabled
3434
#endif
3535
#if MBED_CONF_APP_TEST_WIFI
36-
#if !defined(TARGET_UBLOX_EVK_ODIN_W2) && !defined(TARGET_REALTEK_RTL8195AM)
37-
#error [NOT_SUPPORTED] Tests are valid only for UBLOX_EVK_ODIN_W2 and REALTEK_RTL8195AM
36+
#if !defined(TARGET_UBLOX_EVK_ODIN_W2) && \
37+
!defined(TARGET_REALTEK_RTL8195AM) && \
38+
!defined(TARGET_MTB_ADV_WISE_1530) && \
39+
!defined(TARGET_MTB_USI_WM_BN_BM_22) && \
40+
!defined(TARGET_MTB_MXCHIP_EMW3166) && \
41+
!defined(TARGET_MTB_UBLOX_ODIN_W2)
42+
#error [NOT_SUPPORTED] Wifi tests are not valid for the target
3843
#endif
3944
#endif
4045

tools/test_configs/WicedInterface.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"connect-statement" : {
1111
"help" : "Must use 'net' variable name, replace WIFI_SSID, WIFI_PASSWORD, WIFI_SECURITY with your WiFi settings",
12-
"value" : "((WicedInterface *)net)->connect(WIFI_SSID, WIFI_PASSWORD, WIFI_SECURITY)"
12+
"value" : "net->wifiInterface()->connect(WIFI_SSID, WIFI_PASSWORD, WIFI_SECURITY)"
1313
},
1414
"echo-server-addr" : {
1515
"help" : "IP address of echo server",
@@ -30,6 +30,9 @@
3030
}
3131
},
3232
"target_overrides": {
33+
"*": {
34+
"nsapi.default-stack": "LWIP"
35+
},
3336
"MTB_ADV_WISE_1530": {
3437
"target.extra_labels_add": ["WICED"],
3538
"target.features_add": ["BLE", "LWIP"]

0 commit comments

Comments
 (0)