|
53 | 53 | # quiet: true |
54 | 54 | # === END CI TEST ARGUMENTS === |
55 | 55 |
|
| 56 | +import matter.clusters as Clusters |
| 57 | +from matter.testing.conformance import optional, otherwise, provisional |
56 | 58 | from matter.testing.decorators import async_test_body |
57 | 59 | # TODO: Enable 10.5 in CI once the door lock OTA requestor problem is sorted. |
58 | 60 | from matter.testing.device_conformance_tests import DeviceConformanceTests |
59 | 61 | from matter.testing.runner import TestStep, default_matter_test_main |
| 62 | +from matter.testing.spec_parsing import XmlFeature |
60 | 63 |
|
61 | 64 |
|
62 | 65 | class TC_DeviceConformance(DeviceConformanceTests): |
| 66 | + |
| 67 | + def remove_later_dirty_patch_for_1_6_groupscast_and_onoff(self): |
| 68 | + acl_id = Clusters.AccessControl.id |
| 69 | + groups_id = Clusters.Groups.id |
| 70 | + group_key_management_id = Clusters.GroupKeyManagement.id |
| 71 | + on_off_id = Clusters.OnOff.id |
| 72 | + # TODO (#71577): Remove once the parser is updated to correctly parse this conformance |
| 73 | + if self.xml_clusters[acl_id].revision >= 3: |
| 74 | + aux_mask = Clusters.AccessControl.Bitmaps.Feature.kAuxiliary |
| 75 | + self.xml_clusters[acl_id].features[aux_mask] = XmlFeature(code='AUX', name='Auxiliary', conformance=optional()) |
| 76 | + self.xml_clusters[acl_id].feature_map['AUX'] = aux_mask |
| 77 | + # TODO (#71595): Remove remaining hacks once the DM files for 1.6 are updated. |
| 78 | + if self.xml_clusters[groups_id].revision == 5: |
| 79 | + self.xml_clusters[groups_id].revision = 4 |
| 80 | + if self.xml_clusters[group_key_management_id].revision == 3: |
| 81 | + gcast_mask = Clusters.GroupKeyManagement.Bitmaps.Feature.kGroupcast |
| 82 | + self.xml_clusters[group_key_management_id].features[gcast_mask] = XmlFeature( |
| 83 | + code='GCAST', name='Groupcast', conformance=optional()) |
| 84 | + gcast_adoption_id = Clusters.GroupKeyManagement.Attributes.GroupcastAdoption.attribute_id |
| 85 | + # Conformance for this attribute needs to be wrapped in provisional as the intent it to let this remain provisional post 1.6 |
| 86 | + current_conformance = self.xml_clusters[group_key_management_id].attributes[gcast_adoption_id].conformance |
| 87 | + self.xml_clusters[group_key_management_id].attributes[gcast_adoption_id].conformance = otherwise([ |
| 88 | + provisional(), current_conformance]) |
| 89 | + if self.xml_clusters[on_off_id].revision == 7: |
| 90 | + self.xml_clusters[on_off_id].revision = 6 |
| 91 | + |
63 | 92 | @async_test_body |
64 | 93 | async def setup_class(self): |
65 | 94 | super().setup_class() |
66 | 95 | await self.setup_class_helper() |
| 96 | + self.remove_later_dirty_patch_for_1_6_groupscast_and_onoff() |
67 | 97 |
|
68 | 98 | def test_TC_IDM_10_2(self): |
69 | 99 | # TODO: Turn this off after TE2 |
|
0 commit comments