mirror of
https://github.com/esphome/esphome.git
synced 2026-09-19 19:18:47 +00:00
Skip the doomed gch compile after header-generation failure, self-heal the placeholder from CMake
This commit is contained in:
@@ -244,6 +244,8 @@ def test_pch_cmake_consumer_substitutes_target_and_sources(
|
||||
assert '"$<$<COMPILE_LANGUAGE:CXX>:esphome_pch.h>"' in block
|
||||
assert "set_source_files_properties(${APP_SOURCES} PROPERTIES" in block
|
||||
assert 'OBJECT_DEPENDS "${CMAKE_BINARY_DIR}/esphome_pch.h"' in block
|
||||
# Placeholder guard: survives a build-system-side pristine wipe
|
||||
assert 'file(TOUCH "${CMAKE_BINARY_DIR}/esphome_pch.h")' in block
|
||||
|
||||
|
||||
def test_pch_cmake_consumer_strict_escalates(
|
||||
|
||||
@@ -230,7 +230,8 @@ class TestRunCompilePhases:
|
||||
with pytest.raises(EsphomeError, match="nRF52 native build failed"):
|
||||
self._run()
|
||||
assert "Zephyr header generation failed" in caplog.text
|
||||
assert prepare.called
|
||||
# The doomed .gch compile is skipped: it would latch .gch.failed
|
||||
assert not prepare.called
|
||||
|
||||
def test_generated_headers_failure_strict_raises(
|
||||
self, monkeypatch: pytest.MonkeyPatch, compile_ctx: CompileCtx
|
||||
|
||||
Reference in New Issue
Block a user