From 6dd260e1aba2478914dfb16130ee2e90e30cd294 Mon Sep 17 00:00:00 2001 From: Jenny Plunkett Date: Fri, 1 Dec 2017 14:55:02 -0600 Subject: [PATCH] Added default check for mbed_app.json --- tools/test_configs/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/test_configs/__init__.py b/tools/test_configs/__init__.py index 90666baf24..4b30632ca2 100644 --- a/tools/test_configs/__init__.py +++ b/tools/test_configs/__init__.py @@ -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.targets import TARGET_MAP @@ -28,12 +28,14 @@ def get_config_path(conf_name, target_name): else: return None -def get_default_config(target_name): +def get_default_config(source_dir, target_name): if target_name in TARGET_CONFIGS: config_name = TARGET_CONFIGS[target_name]['default_test_configuration'] if config_name == "NONE": return None 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): return join(CONFIG_DIR, CONFIG_MAP["ETHERNET"]) else: