diff --git a/examples/chip-tool/templates/partials/test_cluster.zapt b/examples/chip-tool/templates/partials/test_cluster.zapt index eccae08f7fec1c..ae5aa12d7c12fc 100644 --- a/examples/chip-tool/templates/partials/test_cluster.zapt +++ b/examples/chip-tool/templates/partials/test_cluster.zapt @@ -189,16 +189,3 @@ class {{filename}}: public TestCommand }; {{/chip_tests}} - -void registerCommandsTests(Commands & commands) -{ - const char * clusterName = "Tests"; - - commands_list clusterCommands = { - {{#chip_tests tests}} - make_unique<{{filename}}>(), - {{/chip_tests}} - }; - - commands.Register(clusterName, clusterCommands); -} diff --git a/examples/chip-tool/templates/tests-commands.zapt b/examples/chip-tool/templates/tests-commands.zapt index 4a7dee80b7d947..4f950dbcd8f825 100644 --- a/examples/chip-tool/templates/tests-commands.zapt +++ b/examples/chip-tool/templates/tests-commands.zapt @@ -5,3 +5,16 @@ #include {{>test_cluster tests=(getTests)}} + +void registerCommandsTests(Commands & commands) +{ + const char * clusterName = "Tests"; + + commands_list clusterCommands = { + {{#chip_tests (getTests)}} + make_unique<{{filename}}>(), + {{/chip_tests}} + }; + + commands.Register(clusterName, clusterCommands); +}