summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorhydevcode <[email protected]>2024-11-05 15:23:14 +0800
committerSupper Thomas <[email protected]>2024-11-05 19:31:20 +0800
commitfc765e2f3271000fb06de95cae14026fc8a8f890 (patch)
treed612c910d724084daa78fa297333a3042c0aeb0d /tools
parentbdf5a1fb092fe3749a48098e06ae7e01815ec36f (diff)
[action] Recursive folder lookup attachconfig.yml
Diffstat (limited to 'tools')
-rw-r--r--tools/ci/bsp_buildings.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/ci/bsp_buildings.py b/tools/ci/bsp_buildings.py
index 74e4e1d934..02cb7f3a92 100644
--- a/tools/ci/bsp_buildings.py
+++ b/tools/ci/bsp_buildings.py
@@ -162,14 +162,15 @@ if __name__ == "__main__":
yml_files_content = []
directory = os.path.join(rtt_root, 'bsp', bsp, '.ci/attachconfig')
if os.path.exists(directory):
- for filename in os.listdir(directory):
- if filename.endswith('attachconfig.yml'):
- file_path = os.path.join(directory, filename)
- if os.path.exists(file_path):
- with open(file_path, 'r') as file:
- content = yaml.safe_load(file)
- yml_files_content.append(content)
-
+ for root, dirs, files in os.walk(directory):
+ for filename in files:
+ if filename.endswith('attachconfig.yml'):
+ file_path = os.path.join(root, filename)
+ if os.path.exists(file_path):
+ with open(file_path, 'r') as file:
+ content = yaml.safe_load(file)
+ yml_files_content.append(content)
+
config_file = os.path.join(rtt_root, 'bsp', bsp, '.config')
for projects in yml_files_content: