Skip to content

Commit a45a60f

Browse files
author
Olli-Pekka Puolitaival
committed
Do not use build_data if not need
1 parent e00d178 commit a45a60f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mbed/mbed.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2680,7 +2680,8 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
26802680
if build_data:
26812681
# Preserve path to given build data
26822682
build_data = os.path.relpath(os.path.join(orig_path, build_data), program.path)
2683-
else:
2683+
elif icetea_supported:
2684+
# Build data needed only if icetea is supported
26842685
# Create the path to the test build data file
26852686
build_data = os.path.join(build_path, 'build_data.json')
26862687

@@ -2727,7 +2728,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
27272728
+ list(chain.from_iterable(zip(repeat('--source'), source)))
27282729
+ ['--build', build_path]
27292730
+ ['--test-spec', test_spec]
2730-
+ ['--build-data', build_data]
2731+
+ (['--build-data', build_data] if build_data else [])
27312732
+ (['-n', tests_by_name_temp] if tests_by_name_temp else [])
27322733
+ (['-v'] if verbose else [])
27332734
+ (['--app-config', app_config] if app_config else [])

0 commit comments

Comments
 (0)