From fe25709a9cd434ddbd87ec78d905f301c23f30e8 Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Fri, 1 Mar 2024 11:07:24 +0100 Subject: [PATCH] twister: add unit_testing soc and board Create board.yml and soc.yml for the unit_testing board so that list_board.py can correctly find those boards for twister unit test test-cases. Signed-off-by: Torsten Rasmussen --- scripts/pylib/twister/boards/unit/unit_testing/board.yml | 5 +++++ scripts/pylib/twister/soc/unit/unit_testing/soc.yml | 2 ++ scripts/pylib/twister/twisterlib/testplan.py | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 scripts/pylib/twister/boards/unit/unit_testing/board.yml create mode 100644 scripts/pylib/twister/soc/unit/unit_testing/soc.yml diff --git a/scripts/pylib/twister/boards/unit/unit_testing/board.yml b/scripts/pylib/twister/boards/unit/unit_testing/board.yml new file mode 100644 index 00000000000..c3427dc0c65 --- /dev/null +++ b/scripts/pylib/twister/boards/unit/unit_testing/board.yml @@ -0,0 +1,5 @@ +board: + name: unit_testing + vendor: zephyr + socs: + - name: unit_testing diff --git a/scripts/pylib/twister/soc/unit/unit_testing/soc.yml b/scripts/pylib/twister/soc/unit/unit_testing/soc.yml new file mode 100644 index 00000000000..b965aa6a6f6 --- /dev/null +++ b/scripts/pylib/twister/soc/unit/unit_testing/soc.yml @@ -0,0 +1,2 @@ +socs: +- name: unit_testing diff --git a/scripts/pylib/twister/twisterlib/testplan.py b/scripts/pylib/twister/twisterlib/testplan.py index 8942cbc4033..5966e223180 100755 --- a/scripts/pylib/twister/twisterlib/testplan.py +++ b/scripts/pylib/twister/twisterlib/testplan.py @@ -404,7 +404,8 @@ class TestPlan: # Note, internally in twister a board root includes the `boards` folder # but in Zephyr build system, the board root is without the `boards` in folder path. board_roots = [Path(os.path.dirname(root)) for root in self.env.board_roots] - lb_args = Namespace(arch_roots=[Path(ZEPHYR_BASE)], soc_roots=[Path(ZEPHYR_BASE)], + lb_args = Namespace(arch_roots=[Path(ZEPHYR_BASE)], soc_roots=[Path(ZEPHYR_BASE), + Path(ZEPHYR_BASE) / 'scripts' / 'pylib' / 'twister'], board_roots=board_roots, board=None, board_dir=None) v1_boards = list_boards.find_boards(lb_args) v2_boards = list_boards.find_v2_boards(lb_args)