Skip to content

Commit 761f507

Browse files
committed
TC-IDM-10.2: Work around conformance for color control
Some attributes are using a non-standard conformance marker in the spec. For now, treat all these as optional and default to the color control cluster tests to properly verify these values. Test: Tested against the example lighting app. The app still HAS conformance issues, but these particular attribues are no longer listed as problems.
1 parent 1913dba commit 761f507

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/python_testing/spec_parsing_support.py

+27
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,33 @@ def remove_problem(location: typing.Union[CommandPathLocation, FeaturePathLocati
507507
clusters[id] = new
508508

509509
# TODO: All these fixups should be removed BEFORE SVE if at all possible
510+
# Workaround for Color Control cluster - the spec uses a non-standard conformance. Set all to optional now, will need
511+
# to implement either arithmetic conformance handling (once spec changes land here) or specific test
512+
# https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/7808 for spec changes.
513+
# see 3.2.8. Defined Primaries Information Attribute Set, affects Primary<#>X/Y/Intensity attributes.
514+
cc_id = Clusters.ColorControl.id
515+
cc_attr = Clusters.ColorControl.Attributes
516+
affected_attributes = [cc_attr.Primary1X,
517+
cc_attr.Primary1Y,
518+
cc_attr.Primary1Intensity,
519+
cc_attr.Primary2X,
520+
cc_attr.Primary2Y,
521+
cc_attr.Primary2Intensity,
522+
cc_attr.Primary3X,
523+
cc_attr.Primary3Y,
524+
cc_attr.Primary3Intensity,
525+
cc_attr.Primary4X,
526+
cc_attr.Primary4Y,
527+
cc_attr.Primary4Intensity,
528+
cc_attr.Primary5X,
529+
cc_attr.Primary5Y,
530+
cc_attr.Primary5Intensity,
531+
cc_attr.Primary6X,
532+
cc_attr.Primary6Y,
533+
cc_attr.Primary6Intensity,
534+
]
535+
for a in affected_attributes:
536+
clusters[cc_id].attributes[a.attribute_id].conformance = optional()
510537

511538
# Workaround for temp control cluster - this is parsed incorrectly in the DM XML and is missing all its attributes
512539
# Remove this workaround when https://github.com/csa-data-model/projects/issues/330 is fixed

0 commit comments

Comments
 (0)