blob: 3c4f7a11776f7217c73cca1e29a1f268e2c0825c [file] [log] [blame]
{{> header}}
#pragma once
#include "TestCommand.h"
#include <lib/support/CHIPListUtils.h>
{{#if (getTests)}}
{{>test_cluster tests=(getTests) credsIssuerConfigArg=false needsWaitDuration=false}}
{{/if}}
std::unique_ptr<TestCommand>GetTestCommand(std::string testName)
{
{{#if (getTests)}}
{{#chip_tests (getTests)}}
if (testName == "{{filename}}")
{
return std::unique_ptr<{{filename}}Suite>(new {{filename}}Suite());
}
{{/chip_tests}}
{{/if}}
return nullptr;
}
void PrintTestCommands()
{
{{#if (getTests)}}
{{#chip_tests (getTests)}}
{{#first}}
ChipLogError(chipTool, "Supported commands:");
{{/first}}
ChipLogError(chipTool, "\t* {{filename}}");
{{else}}
ChipLogError("\t No available commands.");
{{/chip_tests}}
{{/if}}
}