Skip to content

Commit 6dd260e

Browse files
author
Jenny Plunkett
committed
Added default check for mbed_app.json
1 parent 830e9e0 commit 6dd260e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/test_configs/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from os.path import dirname, abspath, join
1+
from os.path import dirname, abspath, join, exists
22

33
from tools.utils import json_file_to_dict
44
from tools.targets import TARGET_MAP
@@ -28,12 +28,14 @@ def get_config_path(conf_name, target_name):
2828
else:
2929
return None
3030

31-
def get_default_config(target_name):
31+
def get_default_config(source_dir, target_name):
3232
if target_name in TARGET_CONFIGS:
3333
config_name = TARGET_CONFIGS[target_name]['default_test_configuration']
3434
if config_name == "NONE":
3535
return None
3636
return join(CONFIG_DIR, CONFIG_MAP[config_name])
37+
elif any(exists(join(dir or ".", "mbed_app.json")) for dir in source_dir):
38+
config = None
3739
elif (target_name in TARGET_MAP and 'LWIP' in TARGET_MAP[target_name].features):
3840
return join(CONFIG_DIR, CONFIG_MAP["ETHERNET"])
3941
else:

0 commit comments

Comments
 (0)