[libretiny] Enable the PlatformIO precompiled header on Linux hosts (#19827)

This commit is contained in:
J. Nick Koston
2026-09-28 18:06:53 +00:00
committed by GitHub
parent 025cf1f638
commit fc803fcc6d
2 changed files with 28 additions and 3 deletions
+14 -1
View File
@@ -109,14 +109,27 @@ def test_pch_checksum_tracks_closure_content(tmp_path: Path) -> None:
assert base != pch.pch_checksum(tmp_path, ["root.h"], ["id"])
@pytest.mark.parametrize("platform", ["esp32", "esp8266", "rp2"])
@pytest.mark.parametrize(
"platform", ["bk72xx", "esp32", "esp8266", "ln882x", "rp2", "rtl87xx"]
)
def test_pch_script_enabled(platform: str, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setattr(pch.sys, "platform", "linux")
CORE.data[KEY_CORE] = {KEY_TARGET_PLATFORM: platform}
assert pch.pch_script_enabled()
monkeypatch.setenv("ESPHOME_PCH_ENABLE", "0")
assert not pch.pch_script_enabled()
@pytest.mark.parametrize("host", ["darwin", "win32"])
@pytest.mark.parametrize("platform", sorted(pch.PCH_SCRIPT_LINUX_ONLY_PLATFORMS))
def test_pch_script_linux_only_platform(
platform: str, host: str, monkeypatch: pytest.MonkeyPatch
) -> None:
monkeypatch.setattr(pch.sys, "platform", host)
CORE.data[KEY_CORE] = {KEY_TARGET_PLATFORM: platform}
assert not pch.pch_script_enabled()
@pytest.mark.parametrize("platform", sorted(pch.PCH_SCRIPT_EXCLUDED_PLATFORMS))
def test_pch_script_excluded_platform(platform: str) -> None:
CORE.data[KEY_CORE] = {KEY_TARGET_PLATFORM: platform}