From cf7b63da6005bad068ac8c68decd8d6c5e736591 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 20 Mar 2026 16:07:30 -1000 Subject: [PATCH] [benchmark] Add both USE_API_PLAINTEXT and USE_API_NOISE defines --- tests/benchmarks/components/api/__init__.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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