Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add targets to Greentea EMAC tests #7159

Merged
merged 1 commit into from Jun 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 12 additions & 3 deletions TESTS/network/emac/emac_test_initialize.cpp
Expand Up @@ -32,12 +32,17 @@

#if MBED_CONF_APP_TEST_WIFI

#ifdef TARGET_UBLOX_EVK_ODIN_W2
#if defined(TARGET_UBLOX_EVK_ODIN_W2) || defined(TARGET_MTB_UBLOX_ODIN_W2)
#include "OdinWiFiInterface.h"
#endif
#ifdef TARGET_REALTEK_RTL8195AM
#include "RTWInterface.h"
#endif
#if defined(TARGET_MTB_ADV_WISE_1530) || \
defined(TARGET_MTB_USI_WM_BN_BM_22) || \
defined(TARGET_MTB_MXCHIP_EMW3166)
#include "WicedInterface.h"
#endif

#endif

Expand All @@ -61,10 +66,14 @@ void test_emac_initialize()
#elif MBED_CONF_APP_TEST_WIFI

// Add wifi classes here
#ifdef TARGET_UBLOX_EVK_ODIN_W2
#if defined(TARGET_UBLOX_EVK_ODIN_W2) || defined(TARGET_MTB_UBLOX_ODIN_W2)
static WiFiInterface *network_interface = new OdinWiFiInterface;
#elif TARGET_REALTEK_RTL8195AM
#elif defined(TARGET_REALTEK_RTL8195AM)
static WiFiInterface *network_interface = new RTWInterface;
#elif defined(TARGET_MTB_ADV_WISE_1530) || \
defined(TARGET_MTB_USI_WM_BN_BM_22) || \
defined(TARGET_MTB_MXCHIP_EMW3166)
static WiFiInterface *network_interface = new WicedInterface;
#else
static WiFiInterface *network_interface = new WiFiInterface;
#endif
Expand Down
9 changes: 7 additions & 2 deletions TESTS/network/emac/main.cpp
Expand Up @@ -33,8 +33,13 @@
#error [NOT_SUPPORTED] Both wifi and ethernet testing cannot be enabled
#endif
#if MBED_CONF_APP_TEST_WIFI
#if !defined(TARGET_UBLOX_EVK_ODIN_W2) && !defined(TARGET_REALTEK_RTL8195AM)
#error [NOT_SUPPORTED] Tests are valid only for UBLOX_EVK_ODIN_W2 and REALTEK_RTL8195AM
#if !defined(TARGET_UBLOX_EVK_ODIN_W2) && \
!defined(TARGET_REALTEK_RTL8195AM) && \
!defined(TARGET_MTB_ADV_WISE_1530) && \
!defined(TARGET_MTB_USI_WM_BN_BM_22) && \
!defined(TARGET_MTB_MXCHIP_EMW3166) && \
!defined(TARGET_MTB_UBLOX_ODIN_W2)
#error [NOT_SUPPORTED] Wifi tests are not valid for the target
#endif
#endif

Expand Down
5 changes: 4 additions & 1 deletion tools/test_configs/WicedInterface.json
Expand Up @@ -9,7 +9,7 @@
},
"connect-statement" : {
"help" : "Must use 'net' variable name, replace WIFI_SSID, WIFI_PASSWORD, WIFI_SECURITY with your WiFi settings",
"value" : "((WicedInterface *)net)->connect(WIFI_SSID, WIFI_PASSWORD, WIFI_SECURITY)"
"value" : "net->wifiInterface()->connect(WIFI_SSID, WIFI_PASSWORD, WIFI_SECURITY)"
},
"echo-server-addr" : {
"help" : "IP address of echo server",
Expand All @@ -30,6 +30,9 @@
}
},
"target_overrides": {
"*": {
"nsapi.default-stack": "LWIP"
},
"MTB_ADV_WISE_1530": {
"target.extra_labels_add": ["WICED"],
"target.features_add": ["BLE", "LWIP"]
Expand Down