blob: 64b9b349372e76843c2050f0009f392f67760e98 [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"}}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"}}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"}}
make_unique<{{filename}}Suite>(credsIssuerConfig),
{{/chip_tests}}
{{#chip_tests "../../../../src/app/tests/suites/manualTests.json"}}
make_unique<{{filename}}Suite>(credsIssuerConfig),
{{/chip_tests}}
#endif // CONFIG_ENABLE_YAML_TESTS
};
commands.Register(clusterName, clusterCommands);
}