Skip to content

Commit

Permalink
Add oven mode yaml (project-chip#31547)
Browse files Browse the repository at this point in the history
* Oven mode yaml scripts and updated ciTests.json file

* format checked

* Restyled by whitespace

* Restyled by prettier-json

* Restyled by prettier-yaml

* Updated ciTests.json

* added and modified the files

* Delete src/app/tests/suites/certification/Test_TC_OM_1_1.yml

* Delete src/app/tests/suites/certification/Test_TC_OM_1_2.yml

* Delete src/app/tests/suites/certification/Test_TC_OM_2_1.yml

* Delete src/app/tests/suites/certification/Test_TC_OM_3_1.yml

* Delete src/app/tests/suites/certification/Test_TC_OM_3_2.yml

* Delete src/app/tests/suites/certification/Test_TC_OM_3_3.yml

* Restyled by whitespace

* Restyled by prettier-json

* Restyled by prettier-yaml

* Restyled by autopep8

* Update src/app/tests/suites/certification/Test_TC_OM_1_1.yaml

Co-authored-by: C Freeman <[email protected]>

* Update src/app/tests/suites/certification/Test_TC_OM_2_1.yaml

Co-authored-by: C Freeman <[email protected]>

* upadted based on the comments from Cecille

* updated TC_2_1

* Restyled by whitespace

* Restyled by prettier-yaml

* updated the files based on correct PICS code

* Restyled by whitespace

* Restyled by prettier-json

* Restyled by prettier-yaml

* Delete src/app/tests/suites/certification/Test_TC_OM_1_1.yaml

* Delete src/app/tests/suites/certification/Test_TC_OM_2_1.yaml

* Delete src/app/tests/suites/certification/Test_TC_OM_3_1.yaml

* Delete src/app/tests/suites/certification/Test_TC_OM_3_2.yaml

* Delete src/app/tests/suites/certification/Test_TC_OM_3_3.yaml

* Delete src/app/tests/suites/certification/Test_TC_OM_1_2.yaml

Deleting coz new 1_2 has been created

* updated Test_TC_OTCCM_2_1.yaml

* updated test scripts and PICS values

* Restyled by whitespace

* updating init.py

* updated PICS.yaml

* updated init.py

* updated init.py

* Restyled by whitespace

* updated files and ran zap_regen

* Restyled by whitespace

* Restyled by prettier-json

* Restyled by prettier-yaml

* Restyled by autopep8

* updated ci-pics-values

* updated __init__.py

* commented 4b 4c in TC_1_1 and ran zap

* updated 1_1

* Restyled by prettier-yaml

* updated manualtest.json and ran zapregen

* Restyled by prettier-json

* Restyled by prettier-yaml

* updated ci-pics-values

* updated pics-value file

* upidated ci-pics-values

* Fixes for test cases

* Restyled by prettier-yaml

---------

Co-authored-by: Prakash  Ravi <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Prakash Ravi <[email protected]>
Co-authored-by: C Freeman <[email protected]>
  • Loading branch information
5 people authored Jan 20, 2024
1 parent 98a547b commit 6aefe30
Show file tree
Hide file tree
Showing 16 changed files with 1,368 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7707,6 +7707,9 @@ endpoint 1 {
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;

handle command ChangeToMode;
handle command ChangeToModeResponse;
}

server cluster LaundryDryerControls {
Expand Down
18 changes: 18 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -8603,6 +8603,24 @@
"side": "server",
"enabled": 1,
"apiMaturity": "provisional",
"commands": [
{
"name": "ChangeToMode",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "ChangeToModeResponse",
"code": 1,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
}
],
"attributes": [
{
"name": "SupportedModes",
Expand Down
4 changes: 4 additions & 0 deletions examples/darwin-framework-tool/templates/tests/ciTests.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
"Test_TC_LWM_3_1",
"Test_TC_LWM_3_2",
"Test_TC_LWM_3_3",
"Test_TC_OTCCM_2_1",
"Test_TC_OTCCM_3_1",
"Test_TC_OTCCM_3_2",
"Test_TC_OTCCM_3_3",
"Disabled because darwin-framework-tool does not support constraints arithmetic operations",
"Test_TC_FLW_2_1",
"Test_TC_RH_2_1",
Expand Down
3 changes: 3 additions & 0 deletions scripts/tests/chiptest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ def _GetChipReplUnsupportedTests() -> Set[str]:
"Test_TC_LWM_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_LWM_3_2.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_LWM_3_3.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_OTCCM_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_OTCCM_3_2.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_OTCCM_3_3.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_G_2_4.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_RVCRUNM_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_RVCCLEANM_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
Expand Down
57 changes: 57 additions & 0 deletions src/app/tests/suites/certification/PICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9037,6 +9037,63 @@ PICS:
- label: "Can the device be controlled manually?"
id: DRYERCTRL.S.M.ManuallyControlled

# Oven Mode Cluster

- label: "Does the device implement the OM cluster as a server?"
id: OTCCM.S

- label: "Does the DUT support testing the failed ChangeToMode command?"
id: OTCCM.S.M.CAN_TEST_MODE_FAILURE

- label:
"Id of mode the device will fail to transition to, given its current
state"
id: PIXIT.OTCCM.MODE_CHANGE_FAIL

- label:
"Id of mode the device will successfully transition to, given its
current state"
id: PIXIT.OTCCM.MODE_CHANGE_OK

#
# server / features
#
- label:
"Does the device support depending on an On/Off cluster implemented on
the same endpoint?"
id: OTCCM.S.F00

#
# server / attributes
#
- label: "Does the device implement the SupportedModes attribute?"
id: OTCCM.S.A0000

- label: "Does the device implement the CurrentMode attribute?"
id: OTCCM.S.A0001

- label: "Does the device implement the StartUpMode attribute?"
id: OTCCM.S.A0002

- label: "Does the device implement the OnMode attribute?"
id: OTCCM.S.A0003

#
# server / Commands received
#
- label: "Does the device implement receiving the ChangeToMode command?"
id: OTCCM.S.C00.Rsp

#
# server / Commands generated
#
- label:
"Does the device implement sending the ChangeToModeResponse command?"
id: OTCCM.S.C01.Tx

- label: "Can the device be controlled manually?"
id: OTCCM.S.M.CAN_MANUALLY_CONTROLLED

# RVC Clean Mode Cluster

- label: "Does the device implement the RVCCLEANM cluster as a server?"
Expand Down
151 changes: 91 additions & 60 deletions src/app/tests/suites/certification/Test_TC_OTCCM_1_1.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024 Project CHIP Authors
# Copyright (c) 2023 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -20,75 +20,106 @@ PICS:

config:
nodeId: 0x12344321
cluster: "Basic Information"
endpoint: 0
cluster: "Oven Mode"
endpoint: 1

tests:
- label:
"Step 1: Commission DUT to TH (can be skipped if done in a preceding
test)."
verification: |
disabled: true
- label: "Step 1: Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Step 2: TH reads from the DUT the ClusterRevision attribute."
verification: |
./chip-tool ovenmode read cluster-revision 1 1
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 1
constraints:
type: int16u

[1705647221.295875][50041:50047] CHIP:DMG: }
[1705647221.296007][50041:50047] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0049 Attribute 0x0000_FFFD DataVersion: 3240184500
[1705647221.296039][50041:50047] CHIP:TOO: ClusterRevision: 1
disabled: true
- label:
"Step 3: TH reads from the DUT the FeatureMap attribute, bit 0: SHALL
be 1 if and only if OTCCM.S.F00(DEPONOFF)"
command: "readAttribute"
attribute: "FeatureMap"
PICS: OTCCM.S.F00
response:
constraints:
type: bitmap32
hasMasksSet: [0x1]

- label: "Step 3: TH reads from the DUT the FeatureMap attribute."
verification: |
./chip-tool ovenmode read feature-map 1 1
[1705647273.001229][53151:53158] CHIP:DMG: }
[1705647273.001266][53151:53158] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0049 Attribute 0x0000_FFFC DataVersion: 3240184500
[1705647273.001279][53151:53158] CHIP:TOO: FeatureMap: 1
disabled: true

- label: "Step 4: TH reads from the DUT the AttributeList attribute."
verification: |
./chip-tool ovenmode read attribute-list 1 1
[1705647386.476019][60066:60072] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0049 Attribute 0x0000_FFFB DataVersion: 3240184500
[1705647386.476098][60066:60072] CHIP:TOO: AttributeList: 7 entries
[1705647386.476117][60066:60072] CHIP:TOO: [1]: 0
[1705647386.476130][60066:60072] CHIP:TOO: [2]: 1
[1705647386.476139][60066:60072] CHIP:TOO: [3]: 65528
[1705647386.476151][60066:60072] CHIP:TOO: [4]: 65529
[1705647386.476162][60066:60072] CHIP:TOO: [5]: 65531
[1705647386.476171][60066:60072] CHIP:TOO: [6]: 65532
[1705647386.476183][60066:60072] CHIP:TOO: [7]: 65533
disabled: true

- label: "Step 5*: TH reads from the DUT the EventList attribute."
verification: |
./chip-tool ovenmode read event-list 1 1
command: "readAttribute"
attribute: "FeatureMap"
PICS: "!OTCCM.S.F00"
response:
value: 0
constraints:
type: bitmap32

- label: "Step 4a: TH reads from the DUT the AttributeList attribute."
PICS: PICS_EVENT_LIST_ENABLED
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533]

- label: "Step 4a: TH reads from the DUT the AttributeList attribute."
PICS: "!PICS_EVENT_LIST_ENABLED"
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [0, 1, 65528, 65529, 65531, 65532, 65533]

- label:
"Step 4b: Read the optional attribute(StartUpMode) in AttributeList"
PICS: OTCCM.S.A0002
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [2]

[1705647422.713386][62252:62257] CHIP:DMG: StatusIB =
[1705647422.713399][62252:62257] CHIP:DMG: {
[1705647422.713411][62252:62257] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE),
[1705647422.713420][62252:62257] CHIP:DMG: },
disabled: true
- label:
"Step 4c: Read the Feature dependent attribute(DEPONOFF) in
AttributeList"
PICS: OTCCM.S.F00
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [3]

- label: "Step 5: TH reads from the DUT the EventList attribute."
PICS: PICS_EVENT_LIST_ENABLED
command: "readAttribute"
attribute: "EventList"
response:
value: []
constraints:
type: list

- label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute."
verification: |
./chip-tool ovenmode read accepted-command-list 1 1
[1705647458.520722][64406:64412] CHIP:DMG: }
[1705647458.520764][64406:64412] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0049 Attribute 0x0000_FFF9 DataVersion: 3240184500
[1705647458.520776][64406:64412] CHIP:TOO: AcceptedCommandList: 0 entries
disabled: true
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
constraints:
type: list
contains: [0]

- label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute."
verification: |
./chip-tool ovenmode read generated-command-list 1 1
[1705647658.986480][76560:76567] CHIP:DMG: }
[1705647658.986529][76560:76567] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0049 Attribute 0x0000_FFF8 DataVersion: 3240184500
[1705647658.986540][76560:76567] CHIP:TOO: GeneratedCommandList: 0 entries
disabled: true
command: "readAttribute"
attribute: "GeneratedCommandList"
response:
constraints:
type: list
contains: [1]
Loading

0 comments on commit 6aefe30

Please sign in to comment.