Skip to content

Commit cf5ded8

Browse files
committed
create symlink for all sub examples which has mbed-os.lib
1 parent b569868 commit cf5ded8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tools/test/examples/examples_lib.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,17 @@ def symlink_mbedos(config, path, exp_filter):
493493
for example in config['examples']:
494494
if example['name'] not in exp_filter:
495495
continue
496-
for name in get_sub_examples_list(example):
496+
497+
# it's not important that all sub examples are defined in exmaples.json to build
498+
# symlink all sub directories with mbed-os.lib
499+
dirs_with_mbed_os_lib = []
500+
for root, dirs, files in os.walk(example['name']):
501+
for the_file in files:
502+
if the_file.endswith("mbed-os.lib"):
503+
dirs_with_mbed_os_lib.append(root)
504+
505+
506+
for name in dirs_with_mbed_os_lib:
497507
os.chdir(name)
498508
logging.info("In folder '%s'" % name)
499509
if os.path.exists("mbed-os.lib"):

0 commit comments

Comments
 (0)