From 0f620c00b042c6ea65fe25fa9c2623e42047a356 Mon Sep 17 00:00:00 2001 From: William Date: Wed, 20 Sep 2023 15:48:52 +0100 Subject: [PATCH] RVC App: enable the RVC Clean StartUpMode attribute (#29248) * Enabled the RvcClean StartUpMode attribute in the zap and mettar files. * Updated the PICS files to note that this device supports testing the StartUpMode attribute for the RVC Clean cluster. * Refactored the run_all_yaml script. * Updated the testing section of the readme to include the test case related to the RvcClean StartUpMode. * Restyled by prettier-markdown * Restyled by shfmt --------- Co-authored-by: Restyled.io --- examples/rvc-app/README.md | 9 ++++++--- examples/rvc-app/run_all_yaml_tests.sh | 13 +++++------- .../pics/RVC Clean Mode Cluster Test Plan.xml | 2 +- .../rvc-common/pics/RVC_App_Test_Plan.txt | 2 +- examples/rvc-app/rvc-common/rvc-app.matter | 2 ++ examples/rvc-app/rvc-common/rvc-app.zap | 20 +++++-------------- 6 files changed, 20 insertions(+), 28 deletions(-) diff --git a/examples/rvc-app/README.md b/examples/rvc-app/README.md index a5d68613fc88bc..cd8bc0461fcbc1 100644 --- a/examples/rvc-app/README.md +++ b/examples/rvc-app/README.md @@ -57,7 +57,7 @@ Example command: PIXIT: `PIXIT_ENDPOINT:1 PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2` Example command: -`/scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_2_1.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1 PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2"` +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_2_1.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1 PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2"` When asked "Manually put the device in a state from which it will FAIL to transition to mode 1", set the `RvcRunMode` to 1. @@ -69,8 +69,11 @@ transition to mode 2", set the `RvcRunMode` to 0. #### TC 3.2 -This is not applicable because this RVC device does not support the -`StartUpMode` attribute. +PIXIT: `PIXIT_ENDPOINT:1` +Example command: +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_3_2.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1"` + +When asked "Physically power cycle the device", do so. ### RVC Run Mode cluster diff --git a/examples/rvc-app/run_all_yaml_tests.sh b/examples/rvc-app/run_all_yaml_tests.sh index a599a6139cdf95..4bf9e7261a7f9e 100755 --- a/examples/rvc-app/run_all_yaml_tests.sh +++ b/examples/rvc-app/run_all_yaml_tests.sh @@ -8,10 +8,7 @@ NODEID=$1 RVC_DEVICE_ENDPOINT=1 - -PICS_RUN="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt" -PICS_CLEAN="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt" -PICS_OP_STATE="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt" +RVC_DEVICE_PICS="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt" if [ -z "$NODEID" ]; then echo "Usage: run_all_yaml_tests [Node ID]" @@ -19,12 +16,12 @@ if [ -z "$NODEID" ]; then fi # RVC Clean Mode cluster -./scripts/tests/yaml/chiptool.py tests Test_TC_RVCCLEANM_1_1 --PICS "$PICS_CLEAN" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && +./scripts/tests/yaml/chiptool.py tests Test_TC_RVCCLEANM_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && # RVC Operational State cluster - ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_1_1 --PICS "$PICS_OP_STATE" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && - ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_2_2 --PICS "$PICS_OP_STATE" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && + ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && + ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_2_2 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && # RVC Run Mode cluster - ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCRUNM_1_1 --PICS "$PICS_RUN" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && + ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCRUNM_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && echo done diff --git a/examples/rvc-app/rvc-common/pics/RVC Clean Mode Cluster Test Plan.xml b/examples/rvc-app/rvc-common/pics/RVC Clean Mode Cluster Test Plan.xml index ce0ddaa38b5307..c5776d9553a9bb 100644 --- a/examples/rvc-app/rvc-common/pics/RVC Clean Mode Cluster Test Plan.xml +++ b/examples/rvc-app/rvc-common/pics/RVC Clean Mode Cluster Test Plan.xml @@ -61,7 +61,7 @@ Draft Does the device implement the StartUpMode attribute? 89.2.2. Attributes - allclusters.html[pdf] O - false + true RVCCLEANM.S.A0003 diff --git a/examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt b/examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt index d0c8529a83d2e0..c4c5ef7586bdce 100644 --- a/examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt +++ b/examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt @@ -1,7 +1,7 @@ RVCCLEANM.S=1 RVCCLEANM.S.A0000=1 RVCCLEANM.S.A0001=1 -RVCCLEANM.S.A0002=0 +RVCCLEANM.S.A0002=1 RVCCLEANM.S.A0003=0 RVCCLEANM.S.C01.Tx=1 RVCCLEANM.S.C00.Rsp=1 diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index fae920d56cafae..a337abfc3f47f2 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -929,6 +929,7 @@ server cluster RvcCleanMode = 85 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; + attribute nullable int8u startUpMode = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1174,6 +1175,7 @@ endpoint 1 { server cluster RvcCleanMode { callback attribute supportedModes; callback attribute currentMode; + callback attribute startUpMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; diff --git a/examples/rvc-app/rvc-common/rvc-app.zap b/examples/rvc-app/rvc-common/rvc-app.zap index 34580f98854834..b51d888203a786 100644 --- a/examples/rvc-app/rvc-common/rvc-app.zap +++ b/examples/rvc-app/rvc-common/rvc-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 12, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 177, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 177, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 177 - ], "deviceVersions": [ 1 ], @@ -5420,10 +5415,9 @@ ] }, { - "id": 11, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 225, "code": 116, "profileId": 259, "label": "MA-robotic-vacuum-cleaner", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 225, "code": 116, "profileId": 259, "label": "MA-robotic-vacuum-cleaner", "name": "MA-robotic-vacuum-cleaner" } ], - "deviceTypeRefs": [ - 225 - ], "deviceVersions": [ 1 ], @@ -7705,11 +7695,11 @@ "mfgCode": null, "side": "server", "type": "int8u", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534,