Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate manual tests from CI tests #14672

Merged
merged 2 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions examples/chip-tool/templates/tests-commands.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,34 @@ public:
}
};

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=true}}
{{>test_cluster tests=(getManualTests) credsIssuerConfigArg=true}}

void registerCommandsTests(Commands & commands, CredentialIssuerCommands * credsIssuerConfig)
{
const char * clusterName = "Tests";

commands_list clusterCommands = {
make_unique<TestList>(),
make_unique<ManualTestList>(),
{{#chip_tests (getTests)}}
make_unique<{{filename}}>(credsIssuerConfig),
{{/chip_tests}}
{{#chip_tests (getManualTests)}}
make_unique<{{filename}}>(credsIssuerConfig),
{{/chip_tests}}
};

commands.Register(clusterName, clusterCommands);
Expand Down
37 changes: 25 additions & 12 deletions examples/chip-tool/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,29 @@
* limitations under the License.
*/

function getManualTests()
{
const DeviceDiscovery = [
'Test_TC_DD_1_5',
'Test_TC_DD_1_6',
'Test_TC_DD_1_7',
'Test_TC_DD_1_8',
'Test_TC_DD_1_9',
];

const Groups = [
'TestGroupDemoCommand',
krypton36 marked this conversation as resolved.
Show resolved Hide resolved
'TestGroupDemoConfig',
];

const tests = [
DeviceDiscovery, //
Groups, //

];
return tests.flat(1);
}

function getTests()
{
const BinaryInput = [
Expand Down Expand Up @@ -58,14 +81,6 @@ function getTests()
'Test_TC_CC_9_3',
];

const DeviceDiscovery = [
'Test_TC_DD_1_5',
'Test_TC_DD_1_6',
'Test_TC_DD_1_7',
'Test_TC_DD_1_8',
'Test_TC_DD_1_9',
];

const DeviceManagement = [
'Test_TC_DM_1_1',
'Test_TC_DM_3_1',
Expand Down Expand Up @@ -256,8 +271,6 @@ function getTests()
const Groups = [
'TestGroupMessaging',
'TestGroupsCluster',
'TestGroupDemoCommand',
'TestGroupDemoConfig',
'TestGroupKeyManagementCluster',
];

Expand All @@ -266,7 +279,6 @@ function getTests()
BooleanState, //
BridgedActions, //
ColorControl, //
DeviceDiscovery, //
DeviceManagement, //
ElectricalMeasurement, //
EthernetNetworkDiagnostics, //
Expand Down Expand Up @@ -300,4 +312,5 @@ function getTests()
//
// Module exports
//
exports.getTests = getTests;
exports.getTests = getTests;
exports.getManualTests = getManualTests;
Loading