diff --git a/tests/benchmarks/components/api/__init__.py b/tests/benchmarks/components/api/__init__.py index 0f18c1b108..069df670c1 100644 --- a/tests/benchmarks/components/api/__init__.py +++ b/tests/benchmarks/components/api/__init__.py @@ -1,12 +1,17 @@ import esphome.codegen as cg from tests.testing_helpers import ComponentManifestOverride +# Keep in sync with esphome/components/api/__init__.py +NOISE_C_LIB = ("esphome/noise-c", "0.1.11") + def override_manifest(manifest: ComponentManifestOverride) -> None: - # Add USE_API_PLAINTEXT so frame helper headers compile. - # We cannot use enable_codegen() because the full api to_code - # brings in socket/network setup that fails in benchmark builds. + # Add defines for frame helper headers without running the full api + # to_code (which brings in socket/network setup that fails in + # benchmark builds). async def to_code(config): cg.add_define("USE_API_PLAINTEXT") + cg.add_define("USE_API_NOISE") + cg.add_library(*NOISE_C_LIB) manifest.to_code = to_code