Skip to content

Commit 6720bfd

Browse files
Merge pull request #5335 from yennster/test-configs-update
Fix for configurable network driver tests
2 parents 3bedff3 + fbdd019 commit 6720bfd

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

tools/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ def get_test_config(config_name, target_name):
20032003
"""Finds the path to a test configuration file
20042004
config_name: path to a custom configuration file OR mbed OS interface "ethernet, wifi_odin, etc"
20052005
target_name: name of target to determing if mbed OS interface given is valid
2006-
returns path to config, boolean of whether it is a module or mbed OS interface
2006+
returns path to config, will return None if no valid config is found
20072007
"""
20082008
# If they passed in a full path
20092009
if exists(config_name):

tools/test_configs/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from os.path import dirname, abspath, join
22

33
from tools.utils import json_file_to_dict
4+
from tools.targets import TARGET_MAP
45

56
CONFIG_DIR = dirname(abspath(__file__))
67
CONFIG_MAP = json_file_to_dict(join(CONFIG_DIR, "config_paths.json"))
@@ -9,6 +10,8 @@
910
def get_valid_configs(target_name):
1011
if target_name in TARGET_CONFIGS:
1112
target_config = TARGET_CONFIGS[target_name]
13+
elif (target_name in TARGET_MAP and 'LWIP' in TARGET_MAP[target_name].features):
14+
target_config = { "default_test_configuration": "ETHERNET", "test_configurations": ["ETHERNET"] }
1215
else:
1316
return {}
1417

@@ -31,5 +34,7 @@ def get_default_config(target_name):
3134
if config_name == "NONE":
3235
return None
3336
return join(CONFIG_DIR, CONFIG_MAP[config_name])
37+
elif (target_name in TARGET_MAP and 'LWIP' in TARGET_MAP[target_name].features):
38+
return join(CONFIG_DIR, CONFIG_MAP["ETHERNET"])
3439
else:
3540
return None

tools/test_configs/target_configs.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
"default_test_configuration": "NONE",
44
"test_configurations": ["ODIN_WIFI", "ODIN_ETHERNET"]
55
},
6-
"K64F": {
7-
"default_test_configuration": "ETHERNET",
8-
"test_configurations": ["ETHERNET"]
9-
},
106
"REALTEK_RTL8195AM": {
117
"default_test_configuration": "NONE",
128
"test_configurations": ["REALTEK_WIFI"]

0 commit comments

Comments
 (0)