Skip to content

fix(build): reject mismatched board configuration - #2240

Open
QiuLsG wants to merge 1 commit into
78:mainfrom
QiuLsG:codex/validate-board-target
Open

fix(build): reject mismatched board configuration#2240
QiuLsG wants to merge 1 commit into
78:mainfrom
QiuLsG:codex/validate-board-target

Conversation

@QiuLsG

@QiuLsG QiuLsG commented Sep 6, 2026

Copy link
Copy Markdown

Summary

  • match IDF_TARGET_* as complete Kconfig symbols instead of prefixes
  • reject explicit board symbols that belong to another board directory or do not support config.json.target
  • stop ambiguous resolution when no candidate supports the requested target
  • verify after reconfigure that Kconfig retained the intended board selection
  • add regression coverage for ESP32/ESP32-S3/ESP32-S31 prefix collisions, directory mismatches, inferred mismatches, and pre-build rejection

Fixes #2239

Testing

  • python -m py_compile scripts/build.py scripts/tests/test_build.py
  • python -m unittest scripts.tests.test_build.VersionTests scripts.tests.test_build.BoardSelectionTests -v (21 passed)
  • python scripts/build.py --list-boards (passed for the current 175-variant matrix)
  • python -m unittest discover -s scripts/tests -v (72 executed; 5 pre-existing Windows TemporaryDirectory cleanup errors remain because those tests try to delete their current working directory)

ESP-IDF is not installed in this Windows environment, so no firmware build or physical hardware smoke test was performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Build] build.py can accept a board configuration for the wrong target or directory

1 participant