From b2af1e1737a3e471e5ea06046070f95ecb1cdb88 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Thu, 22 Feb 2024 12:22:27 +0000 Subject: [PATCH] scripts: west: list_boards: Fix hwmv2 output Fixes the output of list_boards to be in csv format rather than python array format Signed-off-by: Jamie McCrae --- scripts/list_boards.py | 5 +++++ scripts/west_commands/boards.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/list_boards.py b/scripts/list_boards.py index cfe6f0c7393..55fbe970d74 100755 --- a/scripts/list_boards.py +++ b/scripts/list_boards.py @@ -300,6 +300,11 @@ def board_v2_identifiers(board): return identifiers +def board_v2_identifiers_csv(board): + # Return in csv (comma separated value) format + return ",".join(board_v2_identifiers(board)) + + def dump_v2_boards(args): if args.board_dir: root_args = argparse.Namespace(**{'soc_roots': args.soc_roots}) diff --git a/scripts/west_commands/boards.py b/scripts/west_commands/boards.py index 35eb4685eed..d7fc2838bc2 100644 --- a/scripts/west_commands/boards.py +++ b/scripts/west_commands/boards.py @@ -93,4 +93,4 @@ class Boards(WestCommand): if name_re is not None and not name_re.search(board.name): continue log.inf(args.format.format(name=board.name, dir=board.dir, hwm=board.hwm, - identifiers=list_boards.board_v2_identifiers(board))) + identifiers=list_boards.board_v2_identifiers_csv(board)))