Skip to content

Commit

Permalink
TC-IDM-10.2: Add test for provisional clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed May 7, 2024
1 parent 9db03ee commit a4873b0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/python_testing/TC_DeviceConformance.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,22 @@ def record_warning(location, problem):

success = True
allow_provisional = self.user_params.get("allow_provisional", False)
# TODO: automate this once https://github.com/csa-data-model/projects/issues/454 is done.
provisional_cluster_ids = [0x050F, 0x0062]
for endpoint_id, endpoint in self.endpoints_tlv.items():
for cluster_id, cluster in endpoint.items():
cluster_location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id)
if cluster_id not in self.xml_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
record_warning(location=location, problem='Standard cluster found on device, but is not present in spec data')
record_warning(location=cluster_location, problem='Standard cluster found on device, but is not present in spec data')
continue

if not allow_provisional and cluster_id in provisional_cluster_ids:
record_error(location=cluster_location, problem='Provisional cluster found on device')

feature_map = cluster[GlobalAttributeIds.FEATURE_MAP_ID]
attribute_list = cluster[GlobalAttributeIds.ATTRIBUTE_LIST_ID]
all_command_list = cluster[GlobalAttributeIds.ACCEPTED_COMMAND_LIST_ID] + \
Expand Down

0 comments on commit a4873b0

Please sign in to comment.