mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #5335 from yennster/test-configs-update
Fix for configurable network driver testspull/5518/head
commit
6720bfdbdc
|
@ -2003,7 +2003,7 @@ def get_test_config(config_name, target_name):
|
|||
"""Finds the path to a test configuration file
|
||||
config_name: path to a custom configuration file OR mbed OS interface "ethernet, wifi_odin, etc"
|
||||
target_name: name of target to determing if mbed OS interface given is valid
|
||||
returns path to config, boolean of whether it is a module or mbed OS interface
|
||||
returns path to config, will return None if no valid config is found
|
||||
"""
|
||||
# If they passed in a full path
|
||||
if exists(config_name):
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from os.path import dirname, abspath, join
|
||||
|
||||
from tools.utils import json_file_to_dict
|
||||
from tools.targets import TARGET_MAP
|
||||
|
||||
CONFIG_DIR = dirname(abspath(__file__))
|
||||
CONFIG_MAP = json_file_to_dict(join(CONFIG_DIR, "config_paths.json"))
|
||||
|
@ -9,6 +10,8 @@ TARGET_CONFIGS = json_file_to_dict(join(CONFIG_DIR, "target_configs.json"))
|
|||
def get_valid_configs(target_name):
|
||||
if target_name in TARGET_CONFIGS:
|
||||
target_config = TARGET_CONFIGS[target_name]
|
||||
elif (target_name in TARGET_MAP and 'LWIP' in TARGET_MAP[target_name].features):
|
||||
target_config = { "default_test_configuration": "ETHERNET", "test_configurations": ["ETHERNET"] }
|
||||
else:
|
||||
return {}
|
||||
|
||||
|
@ -31,5 +34,7 @@ def get_default_config(target_name):
|
|||
if config_name == "NONE":
|
||||
return None
|
||||
return join(CONFIG_DIR, CONFIG_MAP[config_name])
|
||||
elif (target_name in TARGET_MAP and 'LWIP' in TARGET_MAP[target_name].features):
|
||||
return join(CONFIG_DIR, CONFIG_MAP["ETHERNET"])
|
||||
else:
|
||||
return None
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
"default_test_configuration": "NONE",
|
||||
"test_configurations": ["ODIN_WIFI", "ODIN_ETHERNET"]
|
||||
},
|
||||
"K64F": {
|
||||
"default_test_configuration": "ETHERNET",
|
||||
"test_configurations": ["ETHERNET"]
|
||||
},
|
||||
"REALTEK_RTL8195AM": {
|
||||
"default_test_configuration": "NONE",
|
||||
"test_configurations": ["REALTEK_WIFI"]
|
||||
|
|
Loading…
Reference in New Issue