blob: 5a3f1c07707024f49520d74f06bda95b760bf060 [file] [log] [blame]
{{> header}}
#pragma once
#if CONFIG_ENABLE_YAML_TESTS
#include <commands/tests/TestCommandBridge.h>
#include <lib/core/Optional.h>
#include <system/SystemClock.h>
#include <math.h> // For INFINITY
class TestList : public Command
{
public:
TestList() : Command("list") {};
CHIP_ERROR Run() override
{
{{#chip_tests (getTests)}}printf("{{filename}}\n");{{/chip_tests}}
return CHIP_NO_ERROR;
}
};
class ManualTestList : public Command
{
public:
ManualTestList() : Command("list-manual") {};
CHIP_ERROR Run() override
{
{{#chip_tests (getManualTests)}}printf("{{filename}}\n");{{/chip_tests}}
return CHIP_NO_ERROR;
}
};
{{>test_cluster tests=(getTests) credsIssuerConfigArg=false}}
{{>test_cluster tests=(getManualTests) credsIssuerConfigArg=false}}
#endif // CONFIG_ENABLE_YAML_TESTS
void registerCommandsTests(Commands & commands)
{
const char * clusterName = "Tests";
commands_list clusterCommands = {
#if CONFIG_ENABLE_YAML_TESTS
make_unique<TestList>(),
make_unique<ManualTestList>(),
{{#chip_tests (getTests)}}
make_unique<{{filename}}>(),
{{/chip_tests}}
{{#chip_tests (getManualTests)}}
make_unique<{{filename}}>(),
{{/chip_tests}}
#endif // CONFIG_ENABLE_YAML_TESTS
};
commands.Register(clusterName, clusterCommands);
}