Skip to content

Commit 855bd8e

Browse files
add check for manual control PICS to RVC test scripts per test plans (project-chip#39310)
* add check for manual control PICS to RVC test scripts per test plans * fix line length; fix PICS base for RVCCLEANM manual control * Restyled by autopep8 --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 9d413fd commit 855bd8e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/python_testing/TC_RVCCLEANM_2_1.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ class CommonCodes(Enum):
139139
ret = await self.send_clean_change_to_mode_cmd(newMode=old_current_mode)
140140
asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op")
141141

142-
if self.check_pics("RVCCLEANM.S.M.CAN_TEST_MODE_FAILURE"):
142+
can_test_mode_failure = self.check_pics("RVCCLEANM.S.M.CAN_TEST_MODE_FAILURE")
143+
can_manually_control = self.check_pics("RVCCLEANM.S.M.CAN_MANUALLY_CONTROLLED")
144+
if can_test_mode_failure and can_manually_control:
143145
asserts.assert_true(self.mode_fail in modes,
144146
"The MODE_CHANGE_FAIL PIXIT value (%d) is not a supported mode" % (self.mode_fail))
145147
self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.mode_fail))

src/python_testing/TC_RVCRUNM_2_1.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ class CommonCodes(Enum):
134134
ret = await self.send_change_to_mode_cmd(newMode=old_current_mode)
135135
asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op")
136136

137-
if self.check_pics("RVCRUNM.S.M.CAN_TEST_MODE_FAILURE"):
137+
can_test_mode_failure = self.check_pics("RVCRUNM.S.M.CAN_TEST_MODE_FAILURE")
138+
can_manually_control = self.check_pics("RVCRUNM.S.M.CAN_MANUALLY_CONTROLLED")
139+
if can_test_mode_failure and can_manually_control:
138140
asserts.assert_true(self.mode_fail in modes,
139141
"The MODE_CHANGE_FAIL PIXIT value (%d) is not a supported mode" % (self.mode_fail))
140142
self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.mode_fail))

0 commit comments

Comments
 (0)