|
| 1 | +# |
| 2 | +# Copyright (c) 2024 Project CHIP Authors |
1 | 3 | # All rights reserved.
|
2 | 4 | #
|
3 | 5 | # Licensed under the Apache License, Version 2.0 (the "License");
|
|
29 | 31 | # --discriminator 1234
|
30 | 32 | # --passcode 20202021
|
31 | 33 | # --PICS src/app/tests/suites/certification/ci-pics-values
|
| 34 | +# --int-arg PIXIT.REFALM.AlarmThreshold:5 |
32 | 35 | # --trace-to json:${TRACE_TEST_JSON}.json
|
33 | 36 | # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
|
34 | 37 | # === END CI TEST ARGUMENTS ===
|
@@ -172,7 +175,9 @@ async def _read_refalm_state_attribute(self):
|
172 | 175 | )
|
173 | 176 |
|
174 | 177 | def _wait_thresshold(self):
|
175 |
| - sleep(self.wait_thresshold_v/1000) |
| 178 | + """Wait the defined time at the PIXIT.REFALM.AlarmThreshold to trigger it.""" |
| 179 | + logger.info(f"Sleeping for {self.refalm_threshold_seconds} seconds defined at PIXIT.REFALM.AlarmThreshold") |
| 180 | + sleep(self.refalm_threshold_seconds) |
176 | 181 |
|
177 | 182 | def _send_named_pipe_command(self, command_dict: dict[str, Any]):
|
178 | 183 | app_pid = self.matter_test_config.app_pid
|
@@ -201,13 +206,16 @@ def _send_close_door_commnad(self):
|
201 | 206 | @async_test_body
|
202 | 207 | async def test_TC_REFALM_2_2(self):
|
203 | 208 | """Run the test steps."""
|
204 |
| - self.wait_thresshold_v = 5000 |
205 | 209 | self.is_ci = self.check_pics("PICS_SDK_CI_ONLY")
|
206 | 210 | self.endpoint = self.get_endpoint(default=1)
|
207 | 211 | cluster = Clusters.RefrigeratorAlarm
|
208 |
| - |
209 | 212 | logger.info(f"Default endpoint {self.endpoint}")
|
| 213 | + # Commision the device. |
| 214 | + # Read required variables. |
210 | 215 | self.step(1)
|
| 216 | + asserts.assert_true('PIXIT.REFALM.AlarmThreshold' in self.matter_test_config.global_test_params, "PIXIT.REFALM.AlarmThreshold must be included on the command line in " |
| 217 | + "the --int-arg flag as PIXIT.REFALM.AlarmThreshold:<AlarmThreshold> in seconds.") |
| 218 | + self.refalm_threshold_seconds = self.matter_test_config.global_test_params['PIXIT.REFALM.AlarmThreshold'] |
211 | 219 |
|
212 | 220 | # check is closed
|
213 | 221 | self.step(2)
|
|
0 commit comments