Skip to content

Commit

Permalink
create symlink for all sub examples which has mbed-os.lib
Browse files Browse the repository at this point in the history
  • Loading branch information
saheerb committed Apr 23, 2021
1 parent 9738b27 commit 454765f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tools/test/examples/examples_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,17 @@ def symlink_mbedos(config, path, exp_filter):
for example in config['examples']:
if example['name'] not in exp_filter:
continue
for name in get_sub_examples_list(example):

# it's not important that all sub examples are defined in exmaples.json to build
# symlink all sub directories with mbed-os.lib
dirs_with_mbed_os_lib = []
for root, dirs, files in os.walk(example['name']):
for the_file in files:
if the_file.endswith("mbed-os.lib"):
dirs_with_mbed_os_lib.append(root)


for name in dirs_with_mbed_os_lib:
os.chdir(name)
logging.info("In folder '%s'" % name)
if os.path.exists("mbed-os.lib"):
Expand Down

0 comments on commit 454765f

Please sign in to comment.