Skip to content

Commit

Permalink
Update TC-SMOKECO tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hare-siterwell committed Aug 23, 2023
1 parent f40b789 commit 65d4f29
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 53 deletions.
23 changes: 7 additions & 16 deletions scripts/tests/chiptest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,25 +135,16 @@ def _GetInDevelopmentTests() -> Set[str]:
"Test_TC_PSCFG_1_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters
"Test_TC_PSCFG_2_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters
"Test_TC_PSCFG_2_2.yaml", # Power source configuration cluster is deprecated and removed from all-clusters
"Test_TC_SMOKECO_2_6.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes
# TestEventTriggersEnabled is true, which it's not in CI. Also, test
# has wrong key for eventNumber: because using the right key leads to
# codegen that does not compile.
"Test_TC_SMOKECO_2_2.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes
# TestEventTriggersEnabled is true, which it's not in CI. Also, test
# has wrong key for eventNumber: because using the right key leads to
# codegen that does not compile.
# TestEventTriggersEnabled is true, which it's not in CI.
"Test_TC_SMOKECO_2_3.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes
# TestEventTriggersEnabled is true, which it's not in CI. Also, test
# has wrong key for eventNumber: because using the right key leads to
# codegen that does not compile.
# TestEventTriggersEnabled is true, which it's not in CI.
"Test_TC_SMOKECO_2_4.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes
# TestEventTriggersEnabled is true, which it's not in CI. Also, test
# has wrong key for eventNumber: because using the right key leads to
# codegen that does not compile.
"Test_TC_SMOKECO_2_5.yaml", # chip-repl does not support local timeout (07/20/2023) and test uses unknown
# keepSubscriptions key in the YAML. Also, test has wrong key for eventNumber:
# because using the right key leads to codegen that does not compile.
# TestEventTriggersEnabled is true, which it's not in CI.
"Test_TC_SMOKECO_2_5.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes
# TestEventTriggersEnabled is true, which it's not in CI.
"Test_TC_SMOKECO_2_6.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes
# TestEventTriggersEnabled is true, which it's not in CI.
}


Expand Down
14 changes: 8 additions & 6 deletions src/app/tests/suites/certification/Test_TC_SMOKECO_2_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ config:
TEST_EVENT_TRIGGER_SMOKE_ALARM_CLEAR:
type: int64u
defaultValue: "0xffffffff000000a0"
EVENT_NUMBER:
type: int64u
defaultValue: 0

tests:
- label: "Commission DUT to TH"
Expand Down Expand Up @@ -69,6 +66,11 @@ tests:
constraints:
type: enum8

- label: "TH gets last event number from DUT"
PICS: SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"

- label:
"TH reads TestEventTriggersEnabled attribute from General Diagnostics
Cluster"
Expand Down Expand Up @@ -121,7 +123,7 @@ tests:
PICS: SMOKECO.S.E00
command: "readEvent"
event: "SmokeAlarm"
EVENT_NUMBER: EVENT_NUMBER + 1
isLastEventNumber: true
response:
value: { AlarmSeverityLevel: 1 }

Expand Down Expand Up @@ -201,7 +203,7 @@ tests:
PICS: SMOKECO.S.E00
command: "readEvent"
event: "SmokeAlarm"
EVENT_NUMBER: EVENT_NUMBER + 2
isLastEventNumber: true
response:
value: { AlarmSeverityLevel: 2 }

Expand Down Expand Up @@ -246,6 +248,6 @@ tests:
PICS: SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"
EVENT_NUMBER: EVENT_NUMBER + 3
isLastEventNumber: true
response:
value: {}
14 changes: 8 additions & 6 deletions src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ config:
TEST_EVENT_TRIGGER_CO_ALARM_CLEAR:
type: int64u
defaultValue: "0xffffffff000000a1"
EVENT_NUMBER:
type: int64u
defaultValue: 0

tests:
- label: "Commission DUT to TH"
Expand Down Expand Up @@ -68,6 +65,11 @@ tests:
constraints:
type: enum8

- label: "TH gets last event number from DUT"
PICS: SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"

- label:
"TH reads TestEventTriggersEnabled attribute from General Diagnostics
Cluster"
Expand Down Expand Up @@ -120,7 +122,7 @@ tests:
PICS: SMOKECO.S.E01
command: "readEvent"
event: "COAlarm"
EVENT_NUMBER: EVENT_NUMBER + 1
isLastEventNumber: true
response:
value: { AlarmSeverityLevel: 1 }

Expand Down Expand Up @@ -200,7 +202,7 @@ tests:
PICS: SMOKECO.S.E01
command: "readEvent"
event: "COAlarm"
EVENT_NUMBER: EVENT_NUMBER + 2
isLastEventNumber: true
response:
value: { AlarmSeverityLevel: 2 }

Expand Down Expand Up @@ -245,6 +247,6 @@ tests:
PICS: SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"
EVENT_NUMBER: EVENT_NUMBER + 3
isLastEventNumber: true
response:
value: {}
30 changes: 16 additions & 14 deletions src/app/tests/suites/certification/Test_TC_SMOKECO_2_4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ config:
TEST_EVENT_TRIGGER_END_OF_SERVICE_ALERT_CLEAR:
type: int64u
defaultValue: "0xffffffff000000aa"
EVENT_NUMBER:
type: int64u
defaultValue: 0

tests:
- label: "Commission DUT to TH"
Expand Down Expand Up @@ -81,6 +78,11 @@ tests:
constraints:
type: enum8

- label: "TH gets last event number from DUT"
PICS: SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"

- label:
"TH reads TestEventTriggersEnabled attribute from General Diagnostics
Cluster"
Expand Down Expand Up @@ -133,7 +135,7 @@ tests:
PICS: SMOKECO.S.E02
command: "readEvent"
event: "LowBattery"
EVENT_NUMBER: EVENT_NUMBER + 1
isLastEventNumber: true
response:
value: { AlarmSeverityLevel: 1 }

Expand Down Expand Up @@ -178,7 +180,7 @@ tests:
PICS: SMOKECO.S.E02
command: "readEvent"
event: "LowBattery"
EVENT_NUMBER: EVENT_NUMBER + 2
isLastEventNumber: true
response:
value: { AlarmSeverityLevel: 2 }

Expand Down Expand Up @@ -223,7 +225,7 @@ tests:
PICS: SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"
EVENT_NUMBER: EVENT_NUMBER + 3
isLastEventNumber: true
response:
value: {}

Expand Down Expand Up @@ -279,7 +281,7 @@ tests:
PICS: SMOKECO.S.E03
command: "readEvent"
event: "HardwareFault"
EVENT_NUMBER: EVENT_NUMBER + 4
isLastEventNumber: true
response:
value: {}

Expand Down Expand Up @@ -325,7 +327,7 @@ tests:
PICS: SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"
EVENT_NUMBER: EVENT_NUMBER + 5
isLastEventNumber: true
response:
value: {}

Expand Down Expand Up @@ -381,7 +383,7 @@ tests:
PICS: SMOKECO.S.E04
command: "readEvent"
event: "EndOfService"
EVENT_NUMBER: EVENT_NUMBER + 6
isLastEventNumber: true
response:
value: {}

Expand Down Expand Up @@ -427,7 +429,7 @@ tests:
PICS: SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"
EVENT_NUMBER: EVENT_NUMBER + 7
isLastEventNumber: true
response:
value: {}

Expand Down Expand Up @@ -499,7 +501,7 @@ tests:
PICS: SMOKECO.S.E05
command: "readEvent"
event: "SelfTestComplete"
EVENT_NUMBER: EVENT_NUMBER + 8
isLastEventNumber: true
response:
value: {}

Expand All @@ -516,7 +518,7 @@ tests:
PICS: SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"
EVENT_NUMBER: EVENT_NUMBER + 9
isLastEventNumber: true
response:
value: {}

Expand Down Expand Up @@ -561,7 +563,7 @@ tests:
PICS: SMOKECO.S.E05
command: "readEvent"
event: "SelfTestComplete"
EVENT_NUMBER: EVENT_NUMBER + 10
isLastEventNumber: true
response:
value: {}

Expand All @@ -578,6 +580,6 @@ tests:
PICS: SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"
EVENT_NUMBER: EVENT_NUMBER + 11
isLastEventNumber: true
response:
value: {}
24 changes: 13 additions & 11 deletions src/app/tests/suites/certification/Test_TC_SMOKECO_2_5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ config:
TTEST_EVENT_TRIGGER_SENSITIVITY_LEVEL_CLEAR:
type: int64u
defaultValue: "0xffffffff000000a8"
EVENT_NUMBER:
type: int64u
defaultValue: 0

tests:
- label: "Commission DUT to TH"
Expand Down Expand Up @@ -114,6 +111,11 @@ tests:
constraints:
type: enum8

- label: "TH gets last event number from DUT"
PICS: SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"

- label:
"TH reads TestEventTriggersEnabled attribute from General Diagnostics
Cluster"
Expand Down Expand Up @@ -160,7 +162,7 @@ tests:
PICS: SMOKECO.S.A0008 && SMOKECO.S.E08
command: "readEvent"
event: "InterconnectSmokeAlarm"
EVENT_NUMBER: EVENT_NUMBER + 1
isLastEventNumber: true
response:
value: { AlarmSeverityLevel: interconnectSmokeAlarmSeverityLevel }

Expand Down Expand Up @@ -215,7 +217,7 @@ tests:
PICS: SMOKECO.S.A0008 && SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"
EVENT_NUMBER: EVENT_NUMBER + 2
isLastEventNumber: true
response:
value: {}

Expand Down Expand Up @@ -273,7 +275,7 @@ tests:
PICS: SMOKECO.S.A0009 && SMOKECO.S.E09
command: "readEvent"
event: "InterconnectCOAlarm"
EVENT_NUMBER: EVENT_NUMBER + 3
isLastEventNumber: true
response:
value: { AlarmSeverityLevel: interconnectCOAlarmSeverityLevel }

Expand Down Expand Up @@ -328,7 +330,7 @@ tests:
PICS: SMOKECO.S.E0a
command: "readEvent"
event: "AllClear"
EVENT_NUMBER: EVENT_NUMBER + 4
isLastEventNumber: true
response:
value: {}

Expand Down Expand Up @@ -679,7 +681,7 @@ tests:
PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.E06
command: "readEvent"
event: "AlarmMuted"
EVENT_NUMBER: EVENT_NUMBER + 5
isLastEventNumber: true
response:
value: {}

Expand Down Expand Up @@ -716,7 +718,7 @@ tests:
PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.E07
command: "readEvent"
event: "MuteEnded"
EVENT_NUMBER: EVENT_NUMBER + 6
isLastEventNumber: true
response:
value: {}

Expand Down Expand Up @@ -891,7 +893,7 @@ tests:
PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.E06
command: "readEvent"
event: "AlarmMuted"
EVENT_NUMBER: EVENT_NUMBER + 7
isLastEventNumber: true
response:
value: {}

Expand Down Expand Up @@ -928,7 +930,7 @@ tests:
PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.E07
command: "readEvent"
event: "MuteEnded"
EVENT_NUMBER: EVENT_NUMBER + 8
isLastEventNumber: true
response:
value: {}

Expand Down

0 comments on commit 65d4f29

Please sign in to comment.