[socket] Compile the lookup and client link helpers only when required (#20002)

This commit is contained in:
J. Nick Koston
2026-10-02 07:31:41 -05:00
committed by GitHub
parent 12b016e3d2
commit 3fd8f00e97
6 changed files with 62 additions and 1 deletions
+3
View File
@@ -2,6 +2,7 @@
# shadowing the stdlib module -- no test_*.py (Python-level) tests can live here.
# required for cpp unit testing.
import esphome.codegen as cg
from esphome.components import socket as socket_component
from tests.testing_helpers import ComponentManifestOverride
@@ -12,5 +13,7 @@ def override_manifest(manifest: ComponentManifestOverride) -> None:
async def to_code_testing(config):
await real_to_code(config)
cg.add_define("USE_NETWORK_IPV6", True)
# The gtests link against the filtered helper files.
socket_component.require_tcp_client_link()
manifest.to_code = to_code_testing