Skip to content

Commit

Permalink
Separate manual tests from CI tests (#14672)
Browse files Browse the repository at this point in the history
* Add Manual Test category.

* Generated Code.
  • Loading branch information
Josh V [Apple] authored Feb 4, 2022
1 parent 9423bb4 commit cb8f7d8
Show file tree
Hide file tree
Showing 3 changed files with 1,204 additions and 1,162 deletions.
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',
'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

0 comments on commit cb8f7d8

Please sign in to comment.