[core] Log ignored --skip-bootloader at debug level (#20059)

This commit is contained in:
J. Nick Koston
2026-10-05 12:14:42 +13:00
committed by GitHub
parent 31e0a31c65
commit 4f9cd7821a
2 changed files with 8 additions and 6 deletions
+3 -3
View File
@@ -829,9 +829,9 @@ def write_cpp_file() -> int:
def compile_program(args: ArgsProtocol, config: ConfigType) -> int:
if CORE.skip_bootloader and not (CORE.is_esp32 and CORE.using_toolchain_esp_idf):
# Info, not a warning: an orchestrator cannot see YAML toolchain
# overrides, this is its expected no-op, and a full build is safe.
_LOGGER.info(
# Debug only: an orchestrator cannot see YAML toolchain overrides,
# so this is its expected no-op, and a full build is safe.
_LOGGER.debug(
"--skip-bootloader ignored: only supported on ESP32 with the "
"esp-idf toolchain"
)
+5 -3
View File
@@ -5358,7 +5358,7 @@ def _setup_build_info_test(
return build_info_path, firmware_path
def test_compile_program_warns_and_ignores_skip_bootloader_elsewhere(
def test_compile_program_quietly_ignores_skip_bootloader_elsewhere(
tmp_path: Path, caplog: pytest.LogCaptureFixture
) -> None:
"""A full build is always safe; orchestrators cannot see YAML overrides."""
@@ -5372,11 +5372,13 @@ def test_compile_program_warns_and_ignores_skip_bootloader_elsewhere(
side_effect=EsphomeError("stop here"),
),
pytest.raises(EsphomeError, match="stop here"),
caplog.at_level("INFO"),
caplog.at_level("DEBUG"),
):
compile_program(MockArgs(), config)
assert "--skip-bootloader ignored" in caplog.text
assert [
r.levelno for r in caplog.records if "--skip-bootloader ignored" in r.message
] == [logging.DEBUG]
assert CORE.skip_bootloader is False