Skip to content

Commit 9bd4d24

Browse files
committed
create symbolic links for all sub examples which has mbed-os.lib.
1 parent 9738b27 commit 9bd4d24

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tools/test/examples/examples_lib.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,16 @@ 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+
# traverse the path and find directories with "mbed-os.lib"
498+
dirs_with_mbed_os_lib = []
499+
for root, dirs, files in os.walk(example['name']):
500+
for the_file in files:
501+
if the_file.endswith("mbed-os.lib"):
502+
dirs_with_mbed_os_lib.append(root)
503+
504+
# symlink all sub directories with mbed-os.lib
505+
for name in dirs_with_mbed_os_lib:
497506
os.chdir(name)
498507
logging.info("In folder '%s'" % name)
499508
if os.path.exists("mbed-os.lib"):

0 commit comments

Comments
 (0)