mirror of
https://github.com/esphome/esphome.git
synced 2026-09-11 23:37:34 +00:00
Escalate all strict consumers, keep cached-probe rejections unlatched, drop the dead probe knob
This commit is contained in:
@@ -604,6 +604,11 @@ def test_component_cmakelists_pch_block(monkeypatch: pytest.MonkeyPatch) -> None
|
||||
|
||||
content = get_component_cmakelists()
|
||||
assert '"$<$<COMPILE_LANGUAGE:CXX>:-include>"' in content
|
||||
assert "-Wno-error=invalid-pch" in content
|
||||
monkeypatch.setenv("ESPHOME_PCH_STRICT", "1")
|
||||
strict_content = get_component_cmakelists()
|
||||
assert "-Werror=invalid-pch" in strict_content
|
||||
monkeypatch.delenv("ESPHOME_PCH_STRICT")
|
||||
assert '"$<$<COMPILE_LANGUAGE:CXX>:esphome_pch.h>"' in content
|
||||
monkeypatch.setenv("ESPHOME_PCH_ENABLE", "0")
|
||||
assert "-include" not in get_component_cmakelists()
|
||||
@@ -1296,3 +1301,6 @@ def test_prepare_pch_strict_reprobes_cached_gch(
|
||||
):
|
||||
prepare_pch()
|
||||
assert not gch.exists()
|
||||
# Per-process rejection may not reproduce: the cached path must not
|
||||
# latch the pch off for later non-strict builds
|
||||
assert not (dev / "build" / "esphome_pch.h.gch.failed").exists()
|
||||
|
||||
@@ -542,4 +542,6 @@ def test_pch_script_strict_projenv_skip_gated_on_nobuild(
|
||||
|
||||
def test_pch_script_strict_passes_on_success(tmp_path: Path) -> None:
|
||||
scons_env = _run_script(tmp_path, env_vars={"ESPHOME_PCH_STRICT": "1"})
|
||||
assert scons_env.prepended
|
||||
# Strict escalates the consumer edges too
|
||||
assert "-Werror=invalid-pch" in scons_env.prepended
|
||||
assert "-Wno-error=invalid-pch" not in scons_env.prepended
|
||||
|
||||
Reference in New Issue
Block a user