Skip to content

Commit

Permalink
Add RVC scripts (#28182)
Browse files Browse the repository at this point in the history
* Add RVC scripts

* changed year

* Restyled by whitespace

* Restyled by prettier-yaml

* cleanup

* clean up

* add pics

* Restyled by prettier-yaml

* add rvc to ci tests

* addressed comments

* Restyled by whitespace

* Restyled by prettier-json

* clean up

* add Command.h

* remove duplicate step

* clean up

* new command.h

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Sep 11, 2023
1 parent b083785 commit 327bf48
Show file tree
Hide file tree
Showing 14 changed files with 1,668 additions and 148 deletions.
6 changes: 6 additions & 0 deletions src/app/tests/suites/certification/PICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9550,6 +9550,9 @@ PICS:
the same endpoint?"
id: RVCCLEANM.S.F00

- label: "Does the device read the global attribute: EventList from the DUT"
id: RVCCLEANM.S.Afffa

#
# server / attributes
#
Expand Down Expand Up @@ -9723,6 +9726,9 @@ PICS:
the same endpoint?"
id: RVCRUNM.S.F00

- label: "Does the device read the global attribute: EventList from the DUT"
id: RVCRUNM.S.Afffa

#Attributes
- label: "Does the device implement the SupportedModes attribute?"
id: RVCRUNM.S.A0000
Expand Down
175 changes: 104 additions & 71 deletions src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,89 +11,122 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default

name: 92.1.1. [TC-RVCCLEANM-1.1] Global attributes with DUT as Server
name: 78.1.1. [TC-RVCCLEANM-1.1] Global attributes with server as DUT

PICS:
- RVCCLEANM.S

config:
nodeId: 0x12344321
cluster: "Basic Information"
endpoint: 0
cluster: "RVC Clean 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 2: TH reads from the DUT the ClusterRevision attribute."
verification: |
./chip-tool rvcleanm read cluster-revision 1 1
Verify " ClusterRevision attribute has the value 2 " and reflects the highest revision number 2 on the TH(Chip-tool) and below is the sample log provided for the raspi platform:
[1645775623.658997][3277:3282] CHIP:TOO: ClusterRevision: 1
disabled: true

- label: "Step 3: TH reads from the DUT the FeatureMap attribute."
verification: |
./chip-tool rvcleanm read feature-map 1 1
On the reference app we see featureMap value 1, This value changes depending on DUT implementing the features
Verify FeatureMap attribute On the TH(Chip-tool) Log
[1649052001.646939][8355:8360] CHIP:TOO: FeatureMap: 1
disabled: true

- label: "Step 4: TH reads from the DUT the AttributeList attribute."
verification: |
./chip-tool rvcleanm read attribute-list 1 1
Verify " AttributeList "should include the mandatory attributes (values 0, 2, 3) and
global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528)
list may include optional attribute(value 0x0004), if RVCCLEANM.S.A0004(StartUpMode) supports,
list contains feature dependent attribute (values 0x0005),if RVCCLEANM.S.F00(DEPONOFF) is true on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform:
- 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 the ClusterRevision attribute from the DUT"
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 1
constraints:
type: int16u

- label: "TH reads the FeatureMap attribute from the DUT"
PICS: " !RVCCLEANM.S.F00 "
command: "readAttribute"
attribute: "FeatureMap"
response:
value: 0
constraints:
type: bitmap32

[1676288620.483812][4014:4016] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_FFFB DataVersion: 2649295313
[1676288620.483850][4014:4016] CHIP:TOO: AttributeList: 13 entries
[1676288620.483861][4014:4016] CHIP:TOO: [1]: 0
[1676288620.483870][4014:4016] CHIP:TOO: [2]: 1
[1676288620.483878][4014:4016] CHIP:TOO: [3]: 65528
[1676288620.483886][4014:4016] CHIP:TOO: [4]: 65529
[1676288620.483892][4014:4016] CHIP:TOO: [5]: 65530
[1676288620.483899][4014:4016] CHIP:TOO: [6]: 65531
[1676288620.483906][4014:4016] CHIP:TOO: [7]: 4293984257
[1676288620.483915][4014:4016] CHIP:TOO: [8]: 2
[1676288620.483922][4014:4016] CHIP:TOO: [9]: 3
[1676288620.483929][4014:4016] CHIP:TOO: [10]: 4
[1676288620.483934][4014:4016] CHIP:TOO: [11]: 5
[1676288620.483941][4014:4016] CHIP:TOO: [12]: 65532
[1676288620.483947][4014:4016] CHIP:TOO: [13]: 65533
[1676288620.484034][4014:4016] CHIP:EM: <<< [E:29816i M:167554497 (Ack:41020138)] (S) Msg TX to 1:000000000
*NOTE* : This sample attribute list reflects the currently implemented attributes on the all-clusters-app.
disabled: true

- label: "Step 5: TH reads from the DUT the AcceptedCommandList attribute."
verification: |
./chip-tool rvcleanm read accepted-command-list 1 1
- label:
"Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the correct bit
set"
PICS: RVCCLEANM.S.F00
command: "readAttribute"
attribute: "FeatureMap"
response:
constraints:
type: bitmap32
hasMasksSet: [0x1]

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

Verify the "AcceptedCommandList" contains feature dependent commands
- label:
"TH reads the optional attribute(StartUpMode) in AttributeList from
the DUT"
PICS: RVCCLEANM.S.A0002
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [2]

[1650274602.826352][8965:8970] CHIP:TOO: AcceptedCommandList: 1 entries
[1650274602.826442][8965:8970] CHIP:TOO: [1]: 0
disabled: true
- label:
"Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional
attribute(OnMode) is in AttributeList from the DUT"
PICS: RVCCLEANM.S.F00
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [3]

- label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute."
verification: |
./chip-tool rvcleanm read generated-command-list 1 1
- label:
"Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional
attribute(OnMode) is not in AttributeList from the DUT"
PICS: " !RVCCLEANM.S.F00 "
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
excludes: [3]

- label: "Read the global attribute: EventList from the DUT"
PICS: RVCCLEANM.S.Afffa
command: "readAttribute"
attribute: "EventList"
response:
value: []
constraints:
type: list

Verify "GeneratedCommandList" contains feature dependent commands
- label:
"Read the global attribute AcceptedCommandList. Check if it contains
id 0x0 (ChangeToMode)"
PICS: RVCCLEANM.S.C00.Rsp
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
value: [0]
constraints:
type: list

[1650274662.075309][8972:8977] CHIP:TOO: GeneratedCommandList: 0 entries
disabled: true
- label:
"Read the global attribute: GeneratedCommandList. Check if it contains
id 0x1 (ChangeToModeResponse)"
PICS: RVCCLEANM.S.C01.Tx
command: "readAttribute"
attribute: "GeneratedCommandList"
response:
value: [1]
constraints:
type: list
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PICS:

config:
nodeId: 0x12344321
cluster: "Robotic Vacuum Operational State"
cluster: "Rvc Operational State"
endpoint: 1

tests:
Expand Down
Loading

0 comments on commit 327bf48

Please sign in to comment.