diff options
| author | HiFiPHile <[email protected]> | 2026-08-31 05:26:19 +0200 |
|---|---|---|
| committer | HiFiPHile <[email protected]> | 2026-09-02 10:50:03 +0200 |
| commit | 389ab7e6c8e78f18092f2a968f533b65d18e856d (patch) | |
| tree | 379b3b98c0e5cdec15a17c426cc84c0f12e72e5b /.pre-commit-config.yaml | |
| parent | 13971b58df52bc29de97632295fcae43aeade5c9 (diff) | |
| parent | 42db982e7c6e8ee7d2f80d15a93a7092d3b708c9 (diff) | |
Merge remote-tracking branch 'origin/master' into agent/fix-dwc2-host-fifo-allocation
Diffstat (limited to '.pre-commit-config.yaml')
| -rw-r--r-- | .pre-commit-config.yaml | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d9c8482b..7a29dc89a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,24 +48,44 @@ repos: types_or: [c, header] language: system - # Two hooks, split by what each suite actually reads. The full discovery run costs - # ~55s (deliberate hang/timeout simulations); only test_hil_select (~0.1s) reads - # hw/bsp (board.cmake), src (portable dirs + class include graph) and examples - # (tusb_config.h per test) -- renaming a board, port dir or example breaks it without - # touching test/hil, and catching that here beats waiting for pre-commit CI. + # Two hooks, split by what each suite RUNS, not by what it reads: discovery is + # disjoint (test_hil*.py vs the two named suites) so nothing runs twice, but the + # file patterns overlap where both suites care. hil-test runs test_hil*.py only + # (~80s: deliberate hang and timeout simulations) and is scoped to the rig harness + # that owns them. The one part of it the selector depends on - the BottomLayer + # stdlib-closure AST guard over tools/ci_select.py and its imports - is named + # explicitly by ci-select-test instead, so a tools/ or workflow edit costs 4s + # rather than 80s of hang simulations that have nothing to say about it. + # ci-select-test runs the two selector-adjacent suites (~4s together) that read + # hw/bsp (board.cmake, FAMILY_MCUS), src (portable dirs + class include graph), + # examples (tusb_config.h, skip/only.txt), hw/mcu, the rig rosters under test/hil + # (a roster edit changes what the selector emits), .circleci (the sentinel contract + # config.yml rewrites config2.yml through) and .github/workflows (build.yml's own + # file hand-off and GITHUB_ENV guards) -- renaming a board, port dir or example + # breaks them without touching test/hil, and catching that here beats waiting for + # pre-commit CI. # No types_or: the rig rosters (*.json) are inputs too. # examples/device/mtp/src is in scope: test_hil_bounded parses README_TXT_CONTENT # and md5-checks the logo header from there as its MTP fixtures. - id: hil-test name: hil-test files: ^(test/hil/|examples/device/mtp/src/) - entry: python3 -m unittest discover -s test/hil/test + entry: python3 -m unittest discover -s test/hil/test -p 'test_hil*.py' pass_filenames: false language: system - - id: hil-select-test - name: hil-select-test - files: ^(hw/bsp/|src/|examples/) - entry: python3 test/hil/test/test_hil_select.py + # hil-validate.js decides which boards ship. Its result join has been wrong three times -- + # dropping variant-named rows, letting a PASS erase a FAIL, breaking the `board locked` + # anchor it had just fixed -- each time because the logic was reasoned about instead of run. + - id: hil-validate-logic + name: hil-validate-logic + files: ^\.claude/workflows/ + entry: node .claude/workflows/test-hil-validate.mjs + pass_filenames: false + language: system + - id: ci-select-test + name: ci-select-test + files: ^(hw/bsp/|hw/mcu/|src/|examples/|test/hil/|tools/(ci_select|build|build_utils|get_deps|metrics)\.py$|\.github/(scripts|workflows)/|\.circleci/) + entry: sh -c "python3 test/hil/test/test_ci_select.py && python3 test/hil/test/test_ci_metrics.py && cd test/hil/test && python3 -m unittest -q test_hil_util.BottomLayer" pass_filenames: false language: system |
