Skip to content

Commit 9f181b6

Browse files
kartbenfabiobaltieri
authored andcommitted
doc: _scripts: ensure twister.yaml file is considered in board catalog
Boards may use twister.yaml file to define Twister platforms, so board catalog should also parse them. Fixes: #95721. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 24ca0fb commit 9f181b6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/_scripts/gen_boards_catalog.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -361,14 +361,14 @@ def get_catalog(generate_hw_features=False, hw_features_vendor_filter=None):
361361
# Grab all the twister files for this board and use them to figure out all the archs it
362362
# supports.
363363
board_archs = set()
364-
pattern = f"{board.name}*.yaml"
365-
for twister_file in board.dir.glob(pattern):
366-
try:
367-
with open(twister_file) as f:
368-
board_data = yaml.safe_load(f)
369-
board_archs.add(board_data.get("arch"))
370-
except Exception as e:
371-
logger.error(f"Error parsing twister file {twister_file}: {e}")
364+
for pattern in (f"{board.name}*.yaml", "twister.yaml"):
365+
for twister_file in board.dir.glob(pattern):
366+
try:
367+
with open(twister_file) as f:
368+
board_data = yaml.safe_load(f)
369+
board_archs.add(board_data.get("arch"))
370+
except Exception as e:
371+
logger.error(f"Error parsing twister file {twister_file}: {e}")
372372

373373
if doc_page and doc_page.is_relative_to(ZEPHYR_BASE):
374374
doc_page_path = doc_page.relative_to(ZEPHYR_BASE).as_posix()

0 commit comments

Comments
 (0)