|
15 | 15 | # limitations under the License.
|
16 | 16 | #
|
17 | 17 |
|
18 |
| -# TODO: add to CI. See https://github.com/project-chip/connectedhomeip/issues/34676 |
19 |
| - |
| 18 | +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments |
| 19 | +# for details about the block below. |
| 20 | +# |
| 21 | +# === BEGIN CI TEST ARGUMENTS === |
| 22 | +# test-runner-runs: run1 |
| 23 | +# test-runner-run/run1/app: examples/fabric-admin/scripts/fabric-sync-app.py |
| 24 | +# test-runner-run/run1/app-args: --app-admin=${FABRIC_ADMIN_APP} --app-bridge=${FABRIC_BRIDGE_APP} --stdin-pipe=dut-fsa-stdin --discriminator=1234 |
| 25 | +# test-runner-run/run1/factoryreset: true |
| 26 | +# test-runner-run/run1/script-args: --PICS src/app/tests/suites/certification/ci-pics-values --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --string-arg th_server_app_path:${ALL_CLUSTERS_APP} dut_fsa_stdin_pipe:dut-fsa-stdin --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto |
| 27 | +# test-runner-run/run1/script-start-delay: 5 |
| 28 | +# test-runner-run/run1/quiet: false |
| 29 | +# === END CI TEST ARGUMENTS === |
| 30 | + |
| 31 | +import asyncio |
20 | 32 | import hashlib
|
21 | 33 | import logging
|
22 | 34 | import os
|
@@ -77,8 +89,13 @@ async def setup_class(self):
|
77 | 89 | self.storage = tempfile.TemporaryDirectory(prefix=self.__class__.__name__)
|
78 | 90 | logging.info("Temporary storage directory: %s", self.storage.name)
|
79 | 91 |
|
| 92 | + # Get the named pipe path for the DUT_FSA app input from the user params. |
| 93 | + dut_fsa_stdin_pipe = self.user_params.get("dut_fsa_stdin_pipe", None) |
| 94 | + if dut_fsa_stdin_pipe is not None: |
| 95 | + self.dut_fsa_stdin = open(dut_fsa_stdin_pipe, "w") |
| 96 | + |
80 | 97 | self.th_server_port = th_server_port
|
81 |
| - # These are default testing values |
| 98 | + # These are default testing values. |
82 | 99 | self.th_server_setup_params = _SetupParameters(
|
83 | 100 | setup_qr_code="MT:-24J0AFN00KA0648G00",
|
84 | 101 | manual_code=34970112332,
|
@@ -166,7 +183,14 @@ async def test_TC_MCORE_FS_1_5(self):
|
166 | 183 | asserts.assert_true(type_matches(step_1_dut_parts_list, list), "PartsList is expected to be a list")
|
167 | 184 |
|
168 | 185 | self.step(2)
|
169 |
| - self._ask_for_vendor_commissioning_ux_operation(self.th_server_setup_params) |
| 186 | + if not self.is_ci: |
| 187 | + self._ask_for_vendor_commissioning_ux_operation(self.th_server_setup_params) |
| 188 | + else: |
| 189 | + self.dut_fsa_stdin.write( |
| 190 | + f"pairing onnetwork 2 {self.th_server_setup_params.passcode}\n") |
| 191 | + self.dut_fsa_stdin.flush() |
| 192 | + # Wait for the commissioning to complete. |
| 193 | + await asyncio.sleep(5) |
170 | 194 |
|
171 | 195 | self.step(3)
|
172 | 196 | report_waiting_timeout_delay_sec = 30
|
|
0 commit comments