scripts: twister: New find_v2_boards() function
Current find_v2_boards() has a lot of unnecessarry fluff.
We can make a new version of that function without it
given its use in TestPlan.add_configurations().
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
diff --git a/scripts/list_boards.py b/scripts/list_boards.py
index 597ecf9..b768dd6 100755
--- a/scripts/list_boards.py
+++ b/scripts/list_boards.py
@@ -231,6 +231,17 @@
return boards
+# Note that this does not share the args.board functionality of find_v2_boards
+def find_v2_board_dirs(args):
+ dirs = []
+ board_files = []
+ for root in unique_paths(args.board_roots):
+ board_files.extend((root / 'boards').rglob(BOARD_YML))
+
+ dirs = [board_yml.parent for board_yml in board_files if board_yml.is_file()]
+ return dirs
+
+
def find_v2_boards(args):
root_args = argparse.Namespace(**{'soc_roots': args.soc_roots})
systems = list_hardware.find_v2_systems(root_args)