Skip to content

Commit

Permalink
Remove old workaround (project-chip#33851)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille authored Jun 20, 2024
1 parent 93818c4 commit ed87048
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions src/python_testing/TC_DeviceConformance.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,11 @@ def record_warning(location, problem):
record_problem(location, problem, ProblemSeverity.WARNING)

ignore_attributes: dict[int, list[int]] = {}
ignore_features: dict[int, list[int]] = {}
if ignore_in_progress:
# This is a manually curated list of attributes that are in-progress in the SDK, but have landed in the spec
in_progress_attributes = {Clusters.BasicInformation.id: [0x15, 0x016],
Clusters.PowerSource.id: [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A]}
ignore_attributes.update(in_progress_attributes)
# The spec currently has an error on the power source features
# This should be removed once https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/7823 lands
in_progress_features = {Clusters.PowerSource.id: [(1 << 2), (1 << 3), (1 << 4), (1 << 5)]}
ignore_features.update(in_progress_features)

if is_ci:
# The network commissioning clusters on the CI select the features on the fly and end up non-conformant
Expand Down Expand Up @@ -116,15 +111,11 @@ def record_warning(location, problem):
if f not in self.xml_clusters[cluster_id].features.keys():
record_error(location=location, problem=f'Unknown feature with mask 0x{f:02x}')
continue
if cluster_id in ignore_features and f in ignore_features[cluster_id]:
continue
xml_feature = self.xml_clusters[cluster_id].features[f]
conformance_decision = xml_feature.conformance(feature_map, attribute_list, all_command_list)
if not conformance_allowed(conformance_decision, allow_provisional):
record_error(location=location, problem=f'Disallowed feature with mask 0x{f:02x}')
for feature_mask, xml_feature in self.xml_clusters[cluster_id].features.items():
if cluster_id in ignore_features and feature_mask in ignore_features[cluster_id]:
continue
conformance_decision = xml_feature.conformance(feature_map, attribute_list, all_command_list)
if conformance_decision == ConformanceDecision.MANDATORY and feature_mask not in feature_masks:
record_error(
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/spec_parsing_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def check_clusters_for_unknown_commands(clusters: dict[int, XmlCluster], problem
endpoint_id=0, cluster_id=id, command_id=cmd.id), severity=ProblemSeverity.WARNING, problem="Command with unknown direction"))


def build_xml_clusters() -> tuple[list[XmlCluster], list[ProblemNotice]]:
def build_xml_clusters() -> tuple[dict[int, XmlCluster], list[ProblemNotice]]:
dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', 'clusters')
clusters: dict[int, XmlCluster] = {}
pure_base_clusters: dict[str, XmlCluster] = {}
Expand Down

0 comments on commit ed87048

Please sign in to comment.