mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
[benchmark] Add both USE_API_PLAINTEXT and USE_API_NOISE defines
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user