mirror of
https://github.com/esphome/esphome.git
synced 2026-10-15 02:32:49 +00:00
[espidf] Name the missing configure output when the cache is unusable
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user