Skip to content

Commit

Permalink
Update Darwin zap files to handle tet logging. (#13002)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh V [Apple] authored and pull[bot] committed Aug 30, 2023
1 parent 5840a38 commit 4023422
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/darwin/Framework/CHIP/templates/clusters-tests.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ void WaitForMs(XCTestExpectation * expectation, dispatch_queue_t queue, unsigned
});
}

void Log(XCTestExpectation * expectation, dispatch_queue_t queue, NSString * message){
NSLog(@"%@", message);
[expectation fulfill];
}

// Stub for User Prompts for XCTests to run.
void UserPrompt(XCTestExpectation * expectation, dispatch_queue_t queue, NSString * message) {
[expectation fulfill];
}

void WaitForCommissionee(XCTestExpectation * expectation, dispatch_queue_t queue)
{
CHIPDeviceController * controller = [CHIPDeviceController sharedController];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ResponseHandler {{> subscribeDataCallback}} = nil;

{{#if (isTestOnlyCluster cluster)}}
dispatch_queue_t queue = dispatch_get_main_queue();
{{command}}(expectation, queue{{#chip_tests_item_parameters}}, {{definedValue}}{{/chip_tests_item_parameters}});
{{command}}(expectation, queue{{#chip_tests_item_parameters}}, {{#if (isString type)}}@"{{/if}}{{definedValue}}{{#if (isString type)}}"{{/if}}{{/chip_tests_item_parameters}});
{{else}}
CHIPDevice * device = GetConnectedDevice();
dispatch_queue_t queue = dispatch_get_main_queue();
Expand Down
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ function getTests()
'TestBasicInformation',
'TestGroupsCluster',
'TestIdentifyCluster',
'TestLogCommands',
'TestOperationalCredentialsCluster',
'TestModeSelectCluster',
];
Expand Down
34 changes: 34 additions & 0 deletions src/darwin/Framework/CHIPTests/CHIPClustersTests.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4023422

Please sign in to comment.