diff options
| author | hathach <[email protected]> | 2026-08-21 23:14:25 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-08-21 23:14:25 +0700 |
| commit | 6ff0ef97702c0e6b6d17b7a8fe856b31164efe57 (patch) | |
| tree | ae456b01bc223be69db574be753c191c92abb83a /tools/ci_select.py | |
| parent | 03a329eeda09e073d7de9be84df55d65392e4013 (diff) | |
build_utils: key the caches on the tree, not just the arguments
The eight lru_cache layers take repo-RELATIVE paths - 'hw/bsp/<fam>',
'examples/<ex>/skip.txt', the literal 'hw/bsp' glob - while ci_select._in_repo()
chdirs around every call so one process can classify more than one tree. With no
cwd in the key the second tree gets the first tree's answers.
Reproduced: skip_example('host/bare_api','metro_m0_express') is False at the repo
root and STILL False after chdir into a tree where that board does not exist; only
cache_clear() gave the right answer. It bites the code-size skill's base-vs-branch
worktree compare, /pre-pr, and the first test that points classify_build at a
fixture tree. Master had no caching here, so the hazard arrived with it.
_cwd_cache puts os.getcwd() in the key. The 199-test suite passed before only
because every test happens to pass the real REPO; the new
TestCachesAreKeyedOnTheTree crosses trees deliberately.
Also adds the drift guard the class rule was missing. Ports, hw/mcu, get_deps
tokens and bsp families each have one; the class rule had only a comment claiming
vendor_host.c was the sole "enabled by no example config" case until its removal -
which src/class/bth falsifies today. TestClassesWithNoEnablingExample pins the set
to {bth}, so a class added before its first example, or an example config flipped
to 0, fails here instead of silently selecting nothing on both axes. Verified it
fires by adding a class dir nothing enables.
Diffstat (limited to 'tools/ci_select.py')
0 files changed, 0 insertions, 0 deletions
