Skip to content

Commit 2455ee4

Browse files
authored
[Python] Fix build without host unit test (project-chip#42034)
Since project-chip#41066 build without host unit test fails with: ``` ../src/controller/python/matter/clusters/attribute.cpp:454:22: error: 'TestOnlyOverrideTimedRequestFieldTag' is not a member of 'chip::app::WriteClient' 454 | WriteClient::TestOnlyOverrideTimedRequestFieldTag{}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Apply the common pattern where we return not implemented in case we build the Matter SDK without `CONFIG_BUILD_FOR_HOST_UNIT_TEST` flag.
1 parent dc11cf1 commit 2455ee4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/controller/python/matter/clusters/attribute.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ PyChipError pychip_WriteClient_TestOnlyWriteAttributesWithMismatchedTimedRequest
436436
size_t interactionTimeoutMsSizeT, size_t busyWaitMsSizeT, python::PyWriteAttributeData * writeAttributesData,
437437
size_t attributeDataLength)
438438
{
439+
#if CONFIG_BUILD_FOR_HOST_UNIT_TEST
439440
CHIP_ERROR err = CHIP_NO_ERROR;
440441

441442
uint16_t timedWriteTimeoutMs = static_cast<uint16_t>(timedWriteTimeoutMsSizeT);
@@ -472,6 +473,9 @@ PyChipError pychip_WriteClient_TestOnlyWriteAttributesWithMismatchedTimedRequest
472473

473474
exit:
474475
return ToPyChipError(err);
476+
#else
477+
return ToPyChipError(CHIP_ERROR_NOT_IMPLEMENTED);
478+
#endif
475479
}
476480

477481
PyChipError pychip_WriteClient_WriteGroupAttributes(size_t groupIdSizeT, chip::Controller::DeviceCommissioner * devCtrl,

0 commit comments

Comments
 (0)