summaryrefslogtreecommitdiff
path: root/tools/ci_select.py
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-08-21 14:23:40 +0700
committerhathach <[email protected]>2026-08-21 14:23:40 +0700
commita408a8e9af4a043202f79a2b8e20d229093148e5 (patch)
treeb2a122bfaf08e7e16f3a6315fe54e1d08a0f86ce /tools/ci_select.py
parente13eff8d4e757ebe7709a58fce44017b8be5a84d (diff)
hil: express a board's always-on defines as a variant, dropping build.args
The roster had two ways to pass a cmake -D to a board's build: `build.args`, applied to every variant, and `variant[].defines`, applied to one. They did the same thing, and only metro_m4_express used the first - for MAX3421_HOST=1, which is what makes it the one rig board that compiles hcd_max3421.c. A board whose define is always on now carries a single variant named after itself, which is exactly the shape `board.get('variant') or [{'name': name, 'flags': ''}]` already synthesises everywhere - so the build dir, the HIL report row and the variant-boundary handling are unchanged. raspberry_pi_pico has used that shape for its flags all along. Removes the BuildCfg type and the parallel code path from all four consumers: hil_test.build_board, hil_pool_check's two builders, hil_ci_set_matrix and ci_select.board_options. Verified: the hil-build matrix entry is byte-identical (`-b metro_m4_express -DMAX3421_HOST=1`), hil_test's build command is unchanged, ci_select still selects the board for a max3421 diff with MAX3421_HOST in its options, and a real build of dual/host_info_to_device_cdc and host/cdc_msc_hid on that board still compiles hcd_max3421.c.
Diffstat (limited to 'tools/ci_select.py')
-rwxr-xr-xtools/ci_select.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/ci_select.py b/tools/ci_select.py
index cd63899c1..ced3bbbc0 100755
--- a/tools/ci_select.py
+++ b/tools/ci_select.py
@@ -188,10 +188,12 @@ def bsp_board_options(board_name: str, repo_root: str) -> frozenset:
def board_options(board: dict, repo_root: str) -> set:
- """Build options a board has truthy: the roster entry's build.args plus each
- variant's defines (NAME=VALUE) and raw CFLAGS (-DNAME=VALUE), plus whatever its
- own board.cmake sets (a board can enable a gated port without the roster saying so)."""
- toks = list(board.get('build', {}).get('args', []))
+ """Build options a board has truthy: each variant's defines (NAME=VALUE) and raw
+ CFLAGS (-DNAME=VALUE), plus whatever its own board.cmake sets (a board can enable a
+ gated port without the roster saying so). A board whose option is always on carries
+ a single variant named after itself - metro_m4_express and MAX3421_HOST=1, which is
+ what makes it the one rig board that compiles hcd_max3421.c."""
+ toks = []
for v in board.get('variant', []):
toks += list(v.get('defines', []))
toks += v.get('flags', '').split()