Skip to content

Commit 99cd30f

Browse files
committed
Adjust test configurations for EMAC
Make ETHERNET configuration the default if DEVICE_EMAC is present, instead of if FEATURE_LWIP is present. This limits it to targets which have been ported to the new EMAC API. Add LWIP feature to JSON config, as in principle the targets shouldn't be adding it themselves. Opens scope to having Nanostack-based tests. Disable tests for the Realtek and Wifi drivers that aren't ported yet.
1 parent 0c29538 commit 99cd30f

File tree

6 files changed

+34
-9
lines changed

6 files changed

+34
-9
lines changed

tools/test_configs/EthernetInterface.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,11 @@
2323
"help" : "Some servers send a prefix before echoed message",
2424
"value" : "\"u-blox AG TCP/UDP test service\\n\""
2525
}
26+
},
27+
"target_overrides": {
28+
"*": {
29+
"target.features_add": ["LWIP"],
30+
"nsapi.default-stack": "LWIP"
31+
}
2632
}
2733
}

tools/test_configs/HeapBlockDeviceAndEthernetInterface.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,11 @@
2828
"macro_name": "MBED_TEST_SIM_BLOCKDEVICE",
2929
"value": "HeapBlockDevice"
3030
}
31+
},
32+
"target_overrides": {
33+
"*": {
34+
"target.features_add": ["LWIP"],
35+
"nsapi.default-stack": "LWIP"
36+
}
3137
}
3238
}

tools/test_configs/OdinInterface.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"value" : "new OdinWiFiInterface()"
99
},
1010
"connect-statement" : {
11-
"help" : "Must use 'net' variable name",
12-
"value" : "net->wifiInterface()->connect(WIFI_SSID, WIFI_PASSWORD)"
11+
"help" : "Disabled until EMAC updated",
12+
"value" : null
1313
},
1414
"echo-server-addr" : {
1515
"help" : "IP address of echo server",
@@ -28,5 +28,11 @@
2828
"macro_name": "MBED_TEST_SIM_BLOCKDEVICE",
2929
"value": "HeapBlockDevice"
3030
}
31+
},
32+
"target_overrides": {
33+
"*": {
34+
"target.features_add": ["LWIP"],
35+
"nsapi.default-stack": "LWIP"
36+
}
3137
}
3238
}

tools/test_configs/Odin_EthernetInterface.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
"value": "HeapBlockDevice"
3030
}
3131
},
32-
"target_overrides": {
33-
"UBLOX_EVK_ODIN_W2": {
34-
"target.device_has_remove": ["EMAC"]
32+
"target_overrides": {
33+
"*": {
34+
"target.features_add": ["LWIP"],
35+
"nsapi.default-stack": "LWIP"
3536
}
3637
}
3738
}

tools/test_configs/RealtekInterface.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"value" : "new RTWInterface()"
99
},
1010
"connect-statement" : {
11-
"help" : "Must use 'net' variable name, replace WIFI_SSID, WIFI_PASSWORD, WIFI_SECURITY, WIFI_CHANNEL with your WiFi settings",
12-
"value" : "net->wifiInterface()->connect(WIFI_SSID, WIFI_PASSWORD, WIFI_SECURITY, WIFI_CHANNEL)"
11+
"help" : "Disabled until EMAC updated",
12+
"value" : null
1313
},
1414
"echo-server-addr" : {
1515
"help" : "IP address of echo server",
@@ -28,5 +28,11 @@
2828
"macro_name": "MBED_TEST_SIM_BLOCKDEVICE",
2929
"value": "HeapBlockDevice"
3030
}
31+
},
32+
"target_overrides": {
33+
"*": {
34+
"target.features_add": ["LWIP"],
35+
"nsapi.default-stack": "LWIP"
36+
}
3137
}
3238
}

tools/test_configs/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
def get_valid_configs(target_name):
1212
if target_name in TARGET_CONFIGS:
1313
target_config = TARGET_CONFIGS[target_name]
14-
elif (target_name in TARGET_MAP and 'LWIP' in TARGET_MAP[target_name].features):
14+
elif (target_name in TARGET_MAP and 'EMAC' in TARGET_MAP[target_name].device_has):
1515
target_config = { "default_test_configuration": "ETHERNET", "test_configurations": ["ETHERNET"] }
1616
else:
1717
return {}
@@ -37,7 +37,7 @@ def get_default_config(source_dir, target_name):
3737
return join(CONFIG_DIR, CONFIG_MAP[config_name])
3838
elif Config.find_app_config(source_dir):
3939
return None
40-
elif (target_name in TARGET_MAP and 'LWIP' in TARGET_MAP[target_name].features):
40+
elif (target_name in TARGET_MAP and 'EMAC' in TARGET_MAP[target_name].device_has):
4141
return join(CONFIG_DIR, CONFIG_MAP["ETHERNET"])
4242
else:
4343
return None

0 commit comments

Comments
 (0)