From 43b3c0b0a460c9b1b62ba5e65db79a65721df5cd Mon Sep 17 00:00:00 2001 From: Duyen Tran Date: Thu, 10 Aug 2023 08:57:39 -0400 Subject: [PATCH] remove pause and resume pics guard --- src/python_testing/TC_OPSTATE_2_3.py | 111 +++++++++++++-------------- third_party/imgui/repo | 2 +- third_party/mbedtls/repo | 2 +- third_party/nanopb/repo | 2 +- third_party/openthread/ot-nxp | 2 +- third_party/openthread/repo | 2 +- third_party/ot-br-posix/repo | 2 +- third_party/pigweed/repo | 2 +- third_party/silabs/matter_support | 2 +- 9 files changed, 61 insertions(+), 66 deletions(-) diff --git a/src/python_testing/TC_OPSTATE_2_3.py b/src/python_testing/TC_OPSTATE_2_3.py index d58a0a380b8115..e4781764bcf1c6 100644 --- a/src/python_testing/TC_OPSTATE_2_3.py +++ b/src/python_testing/TC_OPSTATE_2_3.py @@ -81,24 +81,23 @@ async def test_TC_OPSTATE_2_3(self): asserts.assert_true(all(id in state_ids for id in defined_states), "OperationalStateList is missing a required entry") - if self.check_pics("OPSTATE.S.C00.Rsp"): - self.print_step(4, "Send Pause command") - ret = await self.send_pause_cmd() - asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) - - if self.check_pics("OPSTATE.S.M.ST_PAUSED"): - self.print_step(5, "Read OperationalState attribute") - operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, - attribute=attributes.OperationalState) - logging.info("OperationalState: %s" % (operational_state)) - asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kPaused, - "OperationalState ID should be Paused(0x02)") + self.print_step(4, "Send Pause command") + ret = await self.send_pause_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) + + if self.check_pics("OPSTATE.S.M.ST_PAUSED"): + self.print_step(5, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalState) + logging.info("OperationalState: %s" % (operational_state)) + asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kPaused, + "OperationalState ID should be Paused(0x02)") if self.check_pics("OPSTATE.S.A0002"): self.print_step(6, "Read CountdownTime attribute") initial_countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, - attribute=attributes.CountdownTime) + attribute=attributes.CountdownTime) logging.info("CountdownTime: %s" % (initial_countdown_time)) if initial_countdown_time is not NullValue: in_range = (1 <= initial_countdown_time <= 259200) @@ -116,50 +115,46 @@ async def test_TC_OPSTATE_2_3(self): asserts.assert_equal(countdown_time, initial_countdown_time, "CountdownTime(%s) does not equal to the intial CountdownTime(%s)" % (countdown_time, initial_countdown_time)) - if self.check_pics("OPSTATE.S.C00.Rsp"): - self.print_step(9, "Send Pause command") - ret = await self.send_pause_cmd() - asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) - - if self.check_pics("OPSTATE.S.C03.Rsp"): - self.print_step(10, "Send Resume command") - ret = await self.send_resume_cmd() - asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) - - if self.check_pics("OPSTATE.S.M.ST_RUNNING"): - self.print_step(11, "Read OperationalState attribute") - operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, - attribute=attributes.OperationalState) - logging.info("OperationalState: %s" % (operational_state)) - asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kRunning, - "OperationalState(%s) should be Running(0x01)" % operational_state) - - self.print_step(12, "Send Resume command") - ret = await self.send_resume_cmd() - asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) - - if self.check_pics("OPSTATE.S.C00.Rsp"): - self.print_step(13, "Manually put the device in a state where it cannot receive a Pause command") - input("Press Enter when done.\n") - - self.print_step(14, "Send Pause command") - ret = await self.send_pause_cmd() - asserts.assert_equal(ret.commandResponseState.errorStateID, - Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, - "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) - - if self.check_pics("OPSTATE.S.C03.Rsp"): - self.print_step(15, "Manually put the device in a state where it cannot receive a Resume command") - input("Press Enter when done.\n") - - self.print_step(16, "Send Resume command") - ret = await self.send_resume_cmd() - asserts.assert_equal(ret.commandResponseState.errorStateID, - Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, - "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) + self.print_step(9, "Send Pause command") + ret = await self.send_pause_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) + + self.print_step(10, "Send Resume command") + ret = await self.send_resume_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) + + if self.check_pics("OPSTATE.S.M.ST_RUNNING"): + self.print_step(11, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalState) + logging.info("OperationalState: %s" % (operational_state)) + asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kRunning, + "OperationalState(%s) should be Running(0x01)" % operational_state) + + self.print_step(12, "Send Resume command") + ret = await self.send_resume_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) + + self.print_step(13, "Manually put the device in a state where it cannot receive a Pause command") + input("Press Enter when done.\n") + + self.print_step(14, "Send Pause command") + ret = await self.send_pause_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, + Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, + "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) + + self.print_step(15, "Manually put the device in a state where it cannot receive a Resume command") + input("Press Enter when done.\n") + + self.print_step(16, "Send Resume command") + ret = await self.send_resume_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, + Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, + "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) if __name__ == "__main__": diff --git a/third_party/imgui/repo b/third_party/imgui/repo index 226923fa7e9d73..1109de38277fd2 160000 --- a/third_party/imgui/repo +++ b/third_party/imgui/repo @@ -1 +1 @@ -Subproject commit 226923fa7e9d73e28958a04884943318797d9991 +Subproject commit 1109de38277fd2d14d4dca4c1cb8d4a2c4ff0f95 diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index f97832a5ecb422..4e73afe6ed21ed 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit f97832a5ecb422b9fe75d39bc168962d763648e8 +Subproject commit 4e73afe6ed21edfc03057f2c97d541b57d0d01e9 diff --git a/third_party/nanopb/repo b/third_party/nanopb/repo index 09a356071fb9c2..ab19ecbe1b9f37 160000 --- a/third_party/nanopb/repo +++ b/third_party/nanopb/repo @@ -1 +1 @@ -Subproject commit 09a356071fb9c2a31671ad1cf982dc52d5fae1d2 +Subproject commit ab19ecbe1b9f377ab4ee8e762bfe16c39068ad68 diff --git a/third_party/openthread/ot-nxp b/third_party/openthread/ot-nxp index d533504a90f231..015fd8d1dd3fa0 160000 --- a/third_party/openthread/ot-nxp +++ b/third_party/openthread/ot-nxp @@ -1 +1 @@ -Subproject commit d533504a90f2312ba3cfe94f716f3ee9b59d4209 +Subproject commit 015fd8d1dd3fa032e78236f2b15e6ff4131c5108 diff --git a/third_party/openthread/repo b/third_party/openthread/repo index e958f8827ede37..7f4c7fca2e72e2 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit e958f8827ede37d543e962513d332d00dab6b1c3 +Subproject commit 7f4c7fca2e72e2fee3c33f8acf14d36d1be205a6 diff --git a/third_party/ot-br-posix/repo b/third_party/ot-br-posix/repo index b0bbad3ed28e60..8a6c5a03a2eec6 160000 --- a/third_party/ot-br-posix/repo +++ b/third_party/ot-br-posix/repo @@ -1 +1 @@ -Subproject commit b0bbad3ed28e60bef7cd206c15a9a46e0528f919 +Subproject commit 8a6c5a03a2eec6e71cfed0fe35451841ca24bb4e diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index f04f934b3c6991..f4d0b3563c09d9 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit f04f934b3c69910f866059471625a2bc95e113c4 +Subproject commit f4d0b3563c09d945478267fcff619a959cd3e9f6 diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index f76916640f577c..433ccfc014ffe3 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit f76916640f577ce81db2ec361d560c77c2e21478 +Subproject commit 433ccfc014ffe313bf5cbc848478701778040ef2