[espidf] Name the missing configure output when the cache is unusable

This commit is contained in:
J. Nick Koston
2026-09-29 23:21:19 +02:00
parent e335c9abd8
commit efaaaa90ef
2 changed files with 12 additions and 3 deletions
+6 -1
View File
@@ -359,7 +359,12 @@ def ensure_cached_bootloader(verbose: bool = False) -> bool:
table_offset = (app_config or {}).get("PARTITION_TABLE_OFFSET")
compiler = toolchain._resolved_c_compiler()
if offset is None or table_offset is None or compiler is None:
_LOGGER.debug("Bootloader cache unusable: app configure outputs missing")
_LOGGER.info(
"Bootloader cache unusable: offset=%s table_offset=%s compiler=%s",
offset,
table_offset,
compiler,
)
return False
try:
dest = _install_cached(app_config, compiler, verbose)
+6 -2
View File
@@ -484,9 +484,13 @@ def test_size_check_overflow_raises(tmp_path: Path) -> None:
# ------------------------------------------------------------ orchestration
def test_ensure_fails_soft_without_configure_outputs() -> None:
def test_ensure_fails_soft_without_configure_outputs(
caplog: pytest.LogCaptureFixture,
) -> None:
"""No app config or compiler id means fall back, not crash."""
assert bootloader.ensure_cached_bootloader() is False
with caplog.at_level("INFO"):
assert bootloader.ensure_cached_bootloader() is False
assert "cache unusable" in caplog.text # says which input is missing
@contextmanager