blob: 34e80ddfb448431bcc8ee2444ed33e59d9014f32 [file] [log] [blame]
{{> header}}
#pragma once
#if CONFIG_ENABLE_YAML_TESTS
#include <commands/tests/TestCommand.h>
#include <commands/common/Commands.h>
#include <lib/core/Optional.h>
#include <lib/support/CHIPListUtils.h>
#include <system/SystemClock.h>
#include <math.h> // For INFINITY
class TestList : public Command
{
public:
TestList() : Command("list") {};
CHIP_ERROR Run() override
{
{{#chip_tests "../../../../src/app/tests/suites/ciTests.json" includeAllClusters=true}}printf("{{filename}}\n");{{/chip_tests}}
return CHIP_NO_ERROR;
}
};
class ManualTestList : public Command
{
public:
ManualTestList() : Command("list-manual") {};
CHIP_ERROR Run() override
{
{{#chip_tests "../../../../src/app/tests/suites/manualTests.json" includeAllClusters=true}}printf("{{filename}}\n");{{/chip_tests}}
return CHIP_NO_ERROR;
}
};
{{>test_cluster tests="../../../../src/app/tests/suites/ciTests.json" credsIssuerConfigArg=true needsWaitDuration=true}}
{{>test_cluster tests="../../../../src/app/tests/suites/manualTests.json" credsIssuerConfigArg=true needsWaitDuration=true}}
#endif // CONFIG_ENABLE_YAML_TESTS
void registerCommandsTests(Commands & commands, CredentialIssuerCommands * credsIssuerConfig)
{
const char * clusterName = "Tests";
commands_list clusterCommands = {
#if CONFIG_ENABLE_YAML_TESTS
make_unique<TestList>(),
make_unique<ManualTestList>(),
{{#chip_tests "../../../../src/app/tests/suites/ciTests.json" includeAllClusters=true}}
make_unique<{{filename}}Suite>(credsIssuerConfig),
{{/chip_tests}}
{{#chip_tests "../../../../src/app/tests/suites/manualTests.json" includeAllClusters=true}}
make_unique<{{filename}}Suite>(credsIssuerConfig),
{{/chip_tests}}
#endif // CONFIG_ENABLE_YAML_TESTS
};
commands.RegisterCommandSet(clusterName, clusterCommands, "Commands for running YAML tests.");
}