From 0eafe2c288256a96ba2f1e29e2e3ba6e37b21e4c Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Mon, 9 Jul 2018 09:44:55 -0500 Subject: [PATCH] Skip target lookup in test builds. This should allow custom targets to be transferred to each process when building in parallel --- tools/test_api.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/test_api.py b/tools/test_api.py index 8f46cdac90..5b569f2f37 100644 --- a/tools/test_api.py +++ b/tools/test_api.py @@ -2225,7 +2225,11 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name, execution_directory = "." base_path = norm_relative_path(build_path, execution_directory) - target_name = target.name if isinstance(target, Target) else target + if isinstance(target, Target): + target_name + else: + target_name = target + target = TARGET_MAP[target_name] cfg, _, _ = get_config(base_source_paths, target_name, toolchain_name, app_config=app_config) baud_rate = 9600 @@ -2255,7 +2259,7 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name, bin_file = None test_case_folder_name = os.path.basename(test_paths[0]) - args = (src_paths, test_build_path, target, toolchain_name) + args = (src_paths, test_build_path, deepcopy(target), toolchain_name) kwargs = { 'jobs': 1, 'clean': clean,