Add targets to Greentea EMAC tests

Update test configuration file for WicedInterface
pull/7159/head
Juha Ylinen 2018-06-07 12:05:46 +03:00
parent 835d38db58
commit 44ce63e586
3 changed files with 23 additions and 6 deletions

View File

@ -32,12 +32,17 @@
#if MBED_CONF_APP_TEST_WIFI #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" #include "OdinWiFiInterface.h"
#endif #endif
#ifdef TARGET_REALTEK_RTL8195AM #ifdef TARGET_REALTEK_RTL8195AM
#include "RTWInterface.h" #include "RTWInterface.h"
#endif #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 #endif
@ -61,10 +66,14 @@ void test_emac_initialize()
#elif MBED_CONF_APP_TEST_WIFI #elif MBED_CONF_APP_TEST_WIFI
// Add wifi classes here // 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; static WiFiInterface *network_interface = new OdinWiFiInterface;
#elif TARGET_REALTEK_RTL8195AM #elif defined(TARGET_REALTEK_RTL8195AM)
static WiFiInterface *network_interface = new RTWInterface; 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 #else
static WiFiInterface *network_interface = new WiFiInterface; static WiFiInterface *network_interface = new WiFiInterface;
#endif #endif

View File

@ -33,8 +33,13 @@
#error [NOT_SUPPORTED] Both wifi and ethernet testing cannot be enabled #error [NOT_SUPPORTED] Both wifi and ethernet testing cannot be enabled
#endif #endif
#if MBED_CONF_APP_TEST_WIFI #if MBED_CONF_APP_TEST_WIFI
#if !defined(TARGET_UBLOX_EVK_ODIN_W2) && !defined(TARGET_REALTEK_RTL8195AM) #if !defined(TARGET_UBLOX_EVK_ODIN_W2) && \
#error [NOT_SUPPORTED] Tests are valid only for UBLOX_EVK_ODIN_W2 and REALTEK_RTL8195AM !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
#endif #endif

View File

@ -9,7 +9,7 @@
}, },
"connect-statement" : { "connect-statement" : {
"help" : "Must use 'net' variable name, replace WIFI_SSID, WIFI_PASSWORD, WIFI_SECURITY with your WiFi settings", "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" : { "echo-server-addr" : {
"help" : "IP address of echo server", "help" : "IP address of echo server",
@ -30,6 +30,9 @@
} }
}, },
"target_overrides": { "target_overrides": {
"*": {
"nsapi.default-stack": "LWIP"
},
"MTB_ADV_WISE_1530": { "MTB_ADV_WISE_1530": {
"target.extra_labels_add": ["WICED"], "target.extra_labels_add": ["WICED"],
"target.features_add": ["BLE", "LWIP"] "target.features_add": ["BLE", "LWIP"]