diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index bb85b045923d06..87e55c1ace52f0 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -851,6 +851,34 @@ def check_spec_conformance_for_commands(command_type: CommandType) -> bool: # self.fail_current_test("Problems with conformance") logging.error("Problems found with conformance, this should turn into a test failure once #29812 is resolved") + def test_IDM_10_3(self): + # TODO: move to class setup + success = True + clusters, problems = build_xml_clusters() + self.problems = self.problems + problems + for endpoint_id, endpoint in self.endpoints_tlv.items(): + for cluster_id, cluster in endpoint.items(): + if cluster_id not in clusters.keys(): + if (cluster_id & 0xFFFF_0000) != 0: + # manufacturer cluster + continue + location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id) + # TODO: update this from a warning once we have all the data + self.record_warning(self.get_test_name(), location=location, + problem='Standard cluster found on device, but is not present in spec data') + continue + if int(clusters[cluster_id].revision) != cluster[CLUSTER_REVISION_ID]: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, + attribute_id=CLUSTER_REVISION_ID) + self.record_error(self.get_test_name( + ), location=location, problem=f'Revision found on cluster ({cluster[CLUSTER_REVISION_ID]}) does not match revision listed in the spec ({clusters[cluster_id].revision})') + success = False + if not success: + # TODO: Right now, we have failures in all-cluster, so we can't fail this test and keep it in CI. For now, just log. + # Issue tracking: #30210 + # self.fail_current_test("Problems with cluster revision on at least one cluster") + logging.error('Problems with cluster revision on at least one cluster') + if __name__ == "__main__": default_matter_test_main() diff --git a/src/python_testing/spec_parsing_support.py b/src/python_testing/spec_parsing_support.py index b59ef8379e9e63..9cf3cfa86a7307 100644 --- a/src/python_testing/spec_parsing_support.py +++ b/src/python_testing/spec_parsing_support.py @@ -246,7 +246,11 @@ def parse_events(self) -> dict[uint, XmlAttribute]: return events def create_cluster(self) -> XmlCluster: - return XmlCluster(revision=self._cluster.attrib['revision'], derived=self._derived, + try: + revision = int(self._cluster.attrib['revision'], 0) + except ValueError: + revision = 0 + return XmlCluster(revision=revision, derived=self._derived, name=self._name, feature_map=self.params.feature_map, attribute_map=self.params.attribute_map, command_map=self.params.command_map, features=self.parse_features(),