Skip to content

Commit 84a6c77

Browse files
Add a CI test for not reporting things that have not changed.
1 parent a5452d1 commit 84a6c77

File tree

3 files changed

+61
-2
lines changed

3 files changed

+61
-2
lines changed

.github/workflows/tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ jobs:
247247
--chip-tool ./out/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \
248248
run \
249249
--iterations 1 \
250-
--expected-failures 1 \
250+
--expected-failures 2 \
251251
--keep-going \
252252
--test-timeout-seconds 120 \
253253
--all-clusters-app ./out/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \

scripts/tests/chiptest/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ def _GetChipReplUnsupportedTests() -> Set[str]:
276276
def _GetPurposefulFailureTests() -> Set[str]:
277277
"""Tests that fail in YAML on purpose."""
278278
return {
279-
"TestPurposefulFailureEqualities.yaml"
279+
"TestPurposefulFailureEqualities.yaml",
280+
"TestPurposefulFailureExtraReportingOnToggle.yaml",
280281
}
281282

282283

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Copyright (c) 2024 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name:
16+
Test that "passes" if turning on On/Off cluster reports Level Control things
17+
18+
config:
19+
nodeId: 0x12344321
20+
cluster: "On/Off"
21+
endpoint: 1
22+
# We expect our test to time out, so set a timeout that's not too long, but
23+
# long enough that if the server does report the attribute change we will
24+
# almost certianly see it.
25+
timeout: 5
26+
27+
tests:
28+
- label: "Wait for the commissioned device to be retrieved"
29+
cluster: "DelayCommands"
30+
command: "WaitForCommissionee"
31+
arguments:
32+
values:
33+
- name: "nodeId"
34+
value: nodeId
35+
36+
- label: "Turn off the light"
37+
command: "Off"
38+
39+
- label: "Subscribe LevelControl RemainingTime Attribute"
40+
command: "subscribeAttribute"
41+
cluster: "LevelControl"
42+
attribute: "RemainingTime"
43+
minInterval: 0
44+
maxInterval: 5
45+
response:
46+
value: 0
47+
48+
- label: "Turn on the light to see attribute change, if any"
49+
command: "On"
50+
51+
- label: "Check for attribute report"
52+
command: "waitForReport"
53+
cluster: "LevelControl"
54+
attribute: "RemainingTime"
55+
# This test should fail, since there should be no reporting for an
56+
# attribute that did not actually change.
57+
response:
58+
value: 0

0 commit comments

Comments
 (0)