mirror of https://github.com/ARMmbed/mbed-os.git
Added default check for mbed_app.json
parent
830e9e0bcd
commit
6dd260e1ab
|
@ -1,4 +1,4 @@
|
||||||
from os.path import dirname, abspath, join
|
from os.path import dirname, abspath, join, exists
|
||||||
|
|
||||||
from tools.utils import json_file_to_dict
|
from tools.utils import json_file_to_dict
|
||||||
from tools.targets import TARGET_MAP
|
from tools.targets import TARGET_MAP
|
||||||
|
@ -28,12 +28,14 @@ def get_config_path(conf_name, target_name):
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_default_config(target_name):
|
def get_default_config(source_dir, target_name):
|
||||||
if target_name in TARGET_CONFIGS:
|
if target_name in TARGET_CONFIGS:
|
||||||
config_name = TARGET_CONFIGS[target_name]['default_test_configuration']
|
config_name = TARGET_CONFIGS[target_name]['default_test_configuration']
|
||||||
if config_name == "NONE":
|
if config_name == "NONE":
|
||||||
return None
|
return None
|
||||||
return join(CONFIG_DIR, CONFIG_MAP[config_name])
|
return join(CONFIG_DIR, CONFIG_MAP[config_name])
|
||||||
|
elif any(exists(join(dir or ".", "mbed_app.json")) for dir in source_dir):
|
||||||
|
config = None
|
||||||
elif (target_name in TARGET_MAP and 'LWIP' in TARGET_MAP[target_name].features):
|
elif (target_name in TARGET_MAP and 'LWIP' in TARGET_MAP[target_name].features):
|
||||||
return join(CONFIG_DIR, CONFIG_MAP["ETHERNET"])
|
return join(CONFIG_DIR, CONFIG_MAP["ETHERNET"])
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue