diff --git a/scripts/py_matter_yamltests/matter_yamltests/hooks.py b/scripts/py_matter_yamltests/matter_yamltests/hooks.py index c1b1fa53446ab5..575a05d95871ad 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/hooks.py +++ b/scripts/py_matter_yamltests/matter_yamltests/hooks.py @@ -207,6 +207,12 @@ def step_unknown(self): """ pass + async def step_manual(self): + """ + This method is called when the step is executed manually. + """ + pass + class WebSocketRunnerHooks(): def connecting(self, url: str): diff --git a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py index 7ab24f086442a9..ef15b8a0ac1b71 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py +++ b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py @@ -31,6 +31,10 @@ def __init__(self, clusters: List[PseudoCluster]): def supports(self, request) -> bool: return False if self.__get_command(request) is None else True + def is_manual_step(self, request): + return (request.cluster == LogCommands().name and + request.command == "UserPrompt") + def add(self, cluster: PseudoCluster): self.clusters.append(cluster) diff --git a/scripts/py_matter_yamltests/matter_yamltests/runner.py b/scripts/py_matter_yamltests/matter_yamltests/runner.py index 472d3cd8fa8203..25ba0ffcebb248 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/runner.py +++ b/scripts/py_matter_yamltests/matter_yamltests/runner.py @@ -182,6 +182,10 @@ async def _run(self, parser: TestParser, config: TestRunnerConfig): hooks.step_start(request) hooks.step_unknown() continue + elif config.pseudo_clusters.is_manual_step(request): + hooks.step_start(request) + await hooks.step_manual() + continue else: hooks.step_start(request)