[cpptests] support testing platform components (#13075)

Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Javier Peletier
2026-03-10 02:41:02 +00:00
committed by GitHub
co-authored by J. Nick Koston J. Nick Koston
parent 00f809f5f0
commit e82f0f4432
11 changed files with 467 additions and 330 deletions
+5
View File
@@ -71,6 +71,11 @@ class ComponentManifest:
@property
def to_code(self) -> Callable[[Any], None] | None:
if CORE.cpp_testing:
# During C++ testing, only run to_code for allowlisted components
name = self.module.__package__.rsplit(".", 1)[-1]
if name not in CORE.cpp_testing_codegen:
return None
return getattr(self.module, "to_code", None)
@property