mirror of
https://github.com/esphome/esphome.git
synced 2026-08-24 23:26:20 +00:00
# Conflicts: # esphome/components/ble_device_base/ble_gatt_client.h # esphome/components/bluetooth_connection/__init__.py # esphome/components/bluetooth_connection/bluetooth_connection.cpp # esphome/components/bluetooth_connection/bluetooth_connection.h # esphome/components/bluetooth_connection/bluetooth_connection_bluedroid.cpp # esphome/components/bluetooth_connection/bluetooth_connection_bluedroid.h # esphome/components/bluetooth_connection/bluetooth_connection_hub.cpp # esphome/components/bluetooth_connection/bluetooth_connection_hub.h # esphome/components/bluetooth_proxy/__init__.py # esphome/components/bluetooth_proxy/bluetooth_proxy.cpp # esphome/core/defines.h # tests/component_tests/bluetooth_proxy/test_platform_gates.py # tests/components/ble_device_base/__init__.py # tests/components/bluetooth_proxy/test-passive.esp32-c6-idf.yaml
20 lines
980 B
Python
20 lines
980 B
Python
import esphome.codegen as cg
|
|
from tests.testing_helpers import ComponentManifestOverride
|
|
|
|
|
|
def override_manifest(manifest: ComponentManifestOverride) -> None:
|
|
# resolve_irk() is compiled only when a sensor configures irk:
|
|
# (request_irk_support() emits USE_BLE_DEVICE_IRK). The unit-test build has
|
|
# no sensors, so emit the define here to put the real IRK path under test.
|
|
# Likewise the scan-response merger (emitted by the split-report trackers)
|
|
# and the listener vector it dispatches into (codegen-sized by consumers).
|
|
async def to_code_testing(config):
|
|
cg.add_define("USE_BLE_DEVICE_IRK")
|
|
# The gatt contract test exercises the gated lookup helpers; compile
|
|
# their definitions (ble_gatt_client.cpp) into the test build.
|
|
cg.add_define("USE_BLE_GATT_CLIENT")
|
|
cg.add_define("USE_BLE_SCAN_RESPONSE_MERGER")
|
|
cg.add_define("ESPHOME_BLE_DEVICE_BASE_LISTENER_COUNT", 4)
|
|
|
|
manifest.to_code = to_code_testing
|