summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-07-30 02:29:32 +0700
committerGitHub <[email protected]>2026-07-30 02:29:32 +0700
commiteef5af86aa26fe3d72e41156a586a6ed3ffce9f8 (patch)
treefa5ebe3a8d46738338eaee2d4a80717a7a10f464 /hw
parent5d8afbb23248e9d1d5d1fdf434c9c58cc54ba5b7 (diff)
hil, ci: scope HIL builds and tests to the boards a PR affects (#3797)
hil, ci: scope HIL builds and tests to the boards a PR affects Add test/hil/hil_select.py, a stdlib-only selector that maps a PR diff to the rig boards, tests and BSP families a change can affect, and wire it into CI so pull requests build and run only those. A port change picks its families' boards, a class change picks the examples enabling that class, and device/host changes prune the other role. Anything unclassified — infra, an unmapped port, a selector error — falls back to the full matrix, and push/schedule runs are untouched. Move the shared example lists to hil_examples.py; 54 hardware-free tests cover the rules.
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/mcx/family.cmake11
1 files changed, 10 insertions, 1 deletions
diff --git a/hw/bsp/mcx/family.cmake b/hw/bsp/mcx/family.cmake
index 89e2aadf2..60f43e152 100644
--- a/hw/bsp/mcx/family.cmake
+++ b/hw/bsp/mcx/family.cmake
@@ -94,10 +94,19 @@ function(family_configure_example TARGET RTOS)
family_add_tinyusb(${TARGET} OPT_MCU_MCXA15)
endif()
+ # PORT is set per board (board.cmake), so pick the driver at configure time. Spelled out
+ # rather than $<IF:${PORT},...> so the port path stays greppable: test/hil/hil_select.py
+ # maps a portable-driver change to the families whose build file names that directory.
+ if (PORT)
+ set(PORT_SRC ${TOP}/src/portable/chipidea/ci_hs/dcd_ci_hs.c)
+ else ()
+ set(PORT_SRC ${TOP}/src/portable/chipidea/ci_fs/dcd_ci_fs.c)
+ endif ()
+
target_sources(${TARGET} PUBLIC
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
- ${TOP}/src/portable/chipidea/$<IF:${PORT},ci_hs/dcd_ci_hs.c,ci_fs/dcd_ci_fs.c>
+ ${PORT_SRC}
${STARTUP_FILE_${CMAKE_C_COMPILER_ID}}
)
target_include_directories(${TARGET} PUBLIC