Skip to content

Commit b525ae3

Browse files
Use variable is_pics_sdk_ci_only, updated prompt text. Updated usage example.
1 parent f0138e4 commit b525ae3

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -293,27 +293,27 @@ void HandleSimulateLatchPosition(Json::Value & jsonValue)
293293
* echo '{"Name":"SetRefrigeratorDoorStatus", "EndpointId": 1, "DoorOpen": 1}' > /tmp/chip_all_clusters_fifo_1146610
294294
*
295295
* JSON Arguments:
296-
* - "Name": Must be "SetRefDoorStatus"
296+
* - "Name": Must be "SetRefrigeratorDoorStatus"
297297
* - "EndpointId": ID of endpoint
298-
* - "DoorOpen": Status of the door, open or closed.
298+
* - "DoorOpen": Status of the Door, open or closed.
299299
*
300300
* @param jsonValue - JSON payload from named pipe
301301
*/
302-
void SetRefrigetatorDoorStatusHandler(Json::Value & jsonValue)
302+
void SetRefrigeratorDoorStatusHandler(Json::Value & jsonValue)
303303
{
304304
bool hasEndpointId = HasNumericField(jsonValue, "EndpointId");
305305
bool hasDoorStatus = HasNumericField(jsonValue, "DoorOpen");
306306

307307
if (!hasEndpointId || !hasDoorStatus)
308308
{
309309
std::string inputJson = jsonValue.toStyledString();
310-
ChipLogError(NotSpecified, "Missing or invalid value for one of EndpointId, Status in %s", inputJson.c_str());
310+
ChipLogError(NotSpecified, "Missing or invalid value for one of EndpointId, DoorOpen in %s", inputJson.c_str());
311311
return;
312312
}
313313
// values to update the door status
314314
EndpointId endpointId = static_cast<EndpointId>(jsonValue["EndpointId"].asUInt());
315315
bool doorStatus = static_cast<bool>(jsonValue["DoorOpen"].asBool());
316-
ChipLogDetail(NotSpecified, "SetRefrigetatorDoorStatusHandler State -> %d.", doorStatus);
316+
ChipLogDetail(NotSpecified, "SetRefrigeratorDoorStatusHandler State -> %d.", doorStatus);
317317
if (!doorStatus)
318318
{
319319
RefrigeratorAlarmServer::Instance().SetMaskValue(endpointId, doorStatus);
@@ -554,7 +554,7 @@ void AllClustersAppCommandHandler::HandleCommand(intptr_t context)
554554
}
555555
else if (name == "SetRefrigeratorDoorStatus")
556556
{
557-
SetRefrigetatorDoorStatusHandler(self->mJsonValue);
557+
SetRefrigeratorDoorStatusHandler(self->mJsonValue);
558558
}
559559
else
560560
{

src/python_testing/TC_REFALM_2_2.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ async def _get_command_status(self, cmd: ClusterCommand, cmd_str: str = ""):
135135
"""Return the status of the executed command. By default the status is 0x0 unless a different
136136
status on InteractionModel is returned. For this test we consider the status 0x0 as not succesfull."""
137137
cmd_status = Status.Success
138-
if self.is_ci:
138+
if self.is_pics_sdk_ci_only:
139139
try:
140140
await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=self.endpoint, payload=cmd)
141141
except InteractionModelError as uc:
@@ -150,16 +150,16 @@ async def _get_command_status(self, cmd: ClusterCommand, cmd_str: str = ""):
150150
return cmd_status
151151

152152
def _ask_for_closed_door(self):
153-
if self.is_ci:
153+
if self.is_pics_sdk_ci_only:
154154
self._send_close_door_commnad()
155155
sleep(1)
156156
else:
157-
user_response = self.wait_for_user_input(prompt_msg="Ensure that the door on the DUT is closed.",
157+
user_response = self.wait_for_user_input(prompt_msg="Ensure that the door on the DUT is closed. Enter 'y' or 'n' after completition",
158158
default_value="y")
159159
asserts.assert_equal(user_response.lower(), "y")
160160

161161
def _ask_for_open_door(self):
162-
if self.is_ci:
162+
if self.is_pics_sdk_ci_only:
163163
self._send_open_door_command()
164164
else:
165165
user_response = self.wait_for_user_input(prompt_msg="Manually open the door on the DUT. Enter 'y' or 'n' after completition",
@@ -206,7 +206,6 @@ def _send_close_door_commnad(self):
206206
@async_test_body
207207
async def test_TC_REFALM_2_2(self):
208208
"""Run the test steps."""
209-
self.is_ci = self.check_pics("PICS_SDK_CI_ONLY")
210209
self.endpoint = self.get_endpoint(default=1)
211210
cluster = Clusters.RefrigeratorAlarm
212211
logger.info(f"Default endpoint {self.endpoint}")

0 commit comments

Comments
 (0)