diff --git a/TESTS/network/emac/emac_test_multicast_filter.cpp b/TESTS/network/emac/emac_test_multicast_filter.cpp index e427bc8081..d7e898f021 100644 --- a/TESTS/network/emac/emac_test_multicast_filter.cpp +++ b/TESTS/network/emac/emac_test_multicast_filter.cpp @@ -29,7 +29,7 @@ using namespace utest::v1; void test_emac_multicast_filter_cb(int opt) { static bool multicasts_are_filtered = true; - unsigned char forward_addr[ETH_MAC_ADDR_LEN]; + static unsigned char forward_addr[ETH_MAC_ADDR_LEN]; static bool send_request = true; static bool receive = true; static int no_response_cnt = 0; @@ -71,7 +71,6 @@ void test_emac_multicast_filter_cb(int opt) receive = true; break; - case 3: printf("STEP 3: set ipv4 multicast filter, test if input message is filtered\r\n\r\n"); { @@ -145,7 +144,15 @@ void test_emac_multicast_filter_cb(int opt) if (next_step) { RESET_OUTGOING_MSG_DATA; +#if (MBED_CONF_NETWORK_EMAC_NO_SUPPORT_FOR_IPV4_MULTICAST_FILTER == 1) + if (test_step == 2) { + test_step = 5; + } else { + test_step++; + } +#else test_step++; +#endif retries = 0; send_request = true; } diff --git a/TESTS/network/emac/main.cpp b/TESTS/network/emac/main.cpp index c1b2f68fa4..2b17fce2f2 100644 --- a/TESTS/network/emac/main.cpp +++ b/TESTS/network/emac/main.cpp @@ -72,7 +72,10 @@ Case cases[] = { Case("EMAC unicast frame length", test_emac_unicast_frame_len), Case("EMAC unicast burst", test_emac_unicast_burst), Case("EMAC unicast long", test_emac_unicast_long), +#if !((MBED_CONF_NETWORK_EMAC_NO_SUPPORT_FOR_MULTICAST_FILTER == 1) && \ + (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI)) Case("EMAC multicast filter", test_emac_multicast_filter), +#endif // !(MBED_CONF_NETWORK_EMAC_NO_SUPPORT_FOR_MULTICAST_FILTER == 1) Case("EMAC memory", test_emac_memory) }; diff --git a/TESTS/network/emac/mbed_lib.json b/TESTS/network/emac/mbed_lib.json new file mode 100644 index 0000000000..e329450fba --- /dev/null +++ b/TESTS/network/emac/mbed_lib.json @@ -0,0 +1,24 @@ +{ + "name": "network-emac", + "config": { + "NO_SUPPORT_FOR_MULTICAST_FILTER": false, + "NO_SUPPORT_FOR_IPV4_MULTICAST_FILTER": false + }, + "target_overrides": { + "MTB_UBLOX_ODIN_W2": { + "NO_SUPPORT_FOR_MULTICAST_FILTER": true + }, + "UBLOX_EVK_ODIN_W2": { + "NO_SUPPORT_FOR_MULTICAST_FILTER": true + }, + "MTB_MXCHIP_EMW3166": { + "NO_SUPPORT_FOR_IPV4_MULTICAST_FILTER": true + }, + "MTB_ADV_WISE_1530": { + "NO_SUPPORT_FOR_IPV4_MULTICAST_FILTER": true + }, + "MTB_USI_WM_BN_BM_22": { + "NO_SUPPORT_FOR_IPV4_MULTICAST_FILTER": true + } + } +}