mirror of
https://github.com/esphome/esphome.git
synced 2026-09-11 15:27:33 +00:00
Patch the direct ccache probe in the usable-binary test
This commit is contained in:
@@ -1980,7 +1980,14 @@ def test_ccache_env_opt_in_with_usable_binary(
|
||||
) -> None:
|
||||
# Forced on with a runnable binary: no warning, full env exported.
|
||||
p1, p2, p3 = _ccache_patches(tmp_path, "/usr/bin/ccache", tmp_path / "build")
|
||||
with patch.dict("os.environ", {"IDF_CCACHE_ENABLE": "1"}, clear=True), p1, p2, p3:
|
||||
with (
|
||||
patch.dict("os.environ", {"IDF_CCACHE_ENABLE": "1"}, clear=True),
|
||||
patch("esphome.espidf.framework.shutil.which", return_value="/usr/bin/ccache"),
|
||||
patch("esphome.espidf.framework.tool_version_runs", return_value=True),
|
||||
p1,
|
||||
p2,
|
||||
p3,
|
||||
):
|
||||
env = _ccache_env()
|
||||
assert env["IDF_CCACHE_ENABLE"] == "1"
|
||||
assert "ccache" not in caplog.text
|
||||
assert not [r for r in caplog.records if r.levelno >= logging.WARNING]
|
||||
|
||||
Reference in New Issue
Block a user