add enable/disable dnssd tests for the host test build_examples target (#33339)
* Add build variant for dnssd
* Fix tests
* Restyle
---------
Co-authored-by: Andrei Litvin <andreilitvin@google.com>
diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py
index ece157d..bf79722 100755
--- a/scripts/build/build/targets.py
+++ b/scripts/build/build/targets.py
@@ -184,6 +184,8 @@
target.AppendModifier('rpc', enable_rpcs=True)
target.AppendModifier('with-ui', imgui_ui=True)
target.AppendModifier('evse-test-event', enable_test_event_triggers=['EVSE']).OnlyIfRe('-energy-management')
+ target.AppendModifier('enable-dnssd-tests', enable_dnssd_tests=True).OnlyIfRe('-tests')
+ target.AppendModifier('disable-dnssd-tests', enable_dnssd_tests=False).OnlyIfRe('-tests')
return target
diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py
index c1c81db..568e683 100644
--- a/scripts/build/builders/host.py
+++ b/scripts/build/builders/host.py
@@ -15,6 +15,7 @@
import os
from enum import Enum, auto
from platform import uname
+from typing import Optional
from .gn import GnBuilder
@@ -298,7 +299,9 @@
interactive_mode=True, extra_tests=False, use_nl_fault_injection=False, use_platform_mdns=False, enable_rpcs=False,
use_coverage=False, use_dmalloc=False, minmdns_address_policy=None,
minmdns_high_verbosity=False, imgui_ui=False, crypto_library: HostCryptoLibrary = None,
- enable_test_event_triggers=None):
+ enable_test_event_triggers=None,
+ enable_dnssd_tests: Optional[bool] = None
+ ):
super(HostBuilder, self).__init__(
root=os.path.join(root, 'examples', app.ExamplePath()),
runner=runner)
@@ -406,6 +409,12 @@
if 'EVSE' in enable_test_event_triggers:
self.extra_gn_options.append('chip_enable_energy_evse_trigger=true')
+ if enable_dnssd_tests is not None:
+ if enable_dnssd_tests:
+ self.extra_gn_options.append('chip_enable_dnssd_tests=true')
+ else:
+ self.extra_gn_options.append('chip_enable_dnssd_tests=false')
+
if self.board == HostBoard.ARM64:
if not use_clang:
raise Exception("Cross compile only supported using clang")
diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt
index 4bd269b..aff956f 100644
--- a/scripts/build/testdata/all_targets_linux_x64.txt
+++ b/scripts/build/testdata/all_targets_linux_x64.txt
@@ -9,7 +9,7 @@
esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,energy-management,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only][-tracing]
genio-lighting-app
linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang]
-linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,kotlin-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,microwave-oven,refrigerator,rvc,air-purifier,lit-icd,air-quality-sensor,network-manager,energy-management}[-nodeps][-nlfaultinject][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui][-evse-test-event]
+linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,kotlin-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,microwave-oven,refrigerator,rvc,air-purifier,lit-icd,air-quality-sensor,network-manager,energy-management}[-nodeps][-nlfaultinject][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui][-evse-test-event][-enable-dnssd-tests][-disable-dnssd-tests]
linux-x64-efr32-test-runner[-clang]
imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release]
infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage][-trustm]