[core] Extract the shared idedata and size-summary helpers into build_helpers (#18661)

This commit is contained in:
J. Nick Koston
2026-08-23 21:59:19 -05:00
committed by GitHub
parent c8ebe461d1
commit 9974ad97fa
21 changed files with 1091 additions and 483 deletions
+17 -1
View File
@@ -1120,7 +1120,13 @@ def test_should_run_esp32_platformio_with_branch() -> None:
(["esphome/espidf/runner.py"], True),
(["esphome/espidf/framework.py"], True),
(["esphome/build_gen/espidf.py"], True),
# PlatformIO build gen and esp32 component are NOT IDF-infra triggers
# Shared native-build modules the IDF build imports -> trigger
(["esphome/build_helpers/idedata.py"], True),
(["esphome/platformio/library.py"], True),
(["esphome/framework_helpers.py"], True),
# PlatformIO build gen, its toolchain, and the esp32 component are
# NOT IDF-infra triggers
(["esphome/platformio/toolchain.py"], False),
(["esphome/build_gen/platformio.py"], False),
(["esphome/components/esp32/__init__.py"], False),
(["README.md"], False),
@@ -1132,6 +1138,16 @@ def test_esp_idf_infra_changed(changed_files: list[str], expected: bool) -> None
assert determine_jobs._esp_idf_infra_changed(changed_files) is expected
def test_esp_idf_infra_trigger_paths_exist() -> None:
"""A renamed or moved trigger module must fail here, not silently stop
forcing the esp32 IDF compile."""
repo_root = Path(__file__).resolve().parents[2]
for file in determine_jobs.ESP_IDF_INFRA_TRIGGER_FILES:
assert (repo_root / file).is_file(), f"trigger file {file} moved or renamed"
for prefix in determine_jobs.ESP_IDF_INFRA_TRIGGER_PATH_PREFIXES:
assert (repo_root / prefix).is_dir(), f"trigger dir {prefix} moved or renamed"
@pytest.mark.parametrize(
("changed_files", "expected_result"),
[