|
31 | 31 | # --commissioning-method on-network
|
32 | 32 | # --discriminator 1234
|
33 | 33 | # --passcode 20202021
|
34 |
| -# --string-arg th_server_app_path:${ALL_CLUSTERS_APP} dut_fsa_stdin_pipe:dut-fsa-stdin |
| 34 | +# --string-arg th_server_app_path:${ALL_CLUSTERS_APP} |
| 35 | +# --string-arg dut_fsa_stdin_pipe:dut-fsa-stdin |
| 36 | +# --trace-to json:${TRACE_TEST_JSON}.json |
| 37 | +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto |
| 38 | +# factory-reset: true |
| 39 | +# quiet: true |
| 40 | +# run2: |
| 41 | +# app: ${FABRIC_SYNC_APP} |
| 42 | +# app-args: --discriminator=1234 |
| 43 | +# app-stdin-pipe: dut-fsa-stdin |
| 44 | +# script-args: > |
| 45 | +# --PICS src/app/tests/suites/certification/ci-pics-values |
| 46 | +# --storage-path admin_storage.json |
| 47 | +# --commissioning-method on-network |
| 48 | +# --discriminator 1234 |
| 49 | +# --passcode 20202021 |
| 50 | +# --bool-arg unified_fabric_sync_app:true |
| 51 | +# --string-arg th_server_app_path:${ALL_CLUSTERS_APP} |
| 52 | +# --string-arg dut_fsa_stdin_pipe:dut-fsa-stdin |
35 | 53 | # --trace-to json:${TRACE_TEST_JSON}.json
|
36 | 54 | # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
|
37 | 55 | # factory-reset: true
|
|
47 | 65 | import chip.clusters as Clusters
|
48 | 66 | from chip.interaction_model import Status
|
49 | 67 | from chip.testing.apps import AppServerSubprocess
|
50 |
| -from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main |
| 68 | +from chip.testing.matter_testing import MatterBaseTest, SetupParameters, TestStep, async_test_body, default_matter_test_main |
51 | 69 | from mobly import asserts
|
52 | 70 |
|
53 | 71 | _DEVICE_TYPE_AGGREGATOR = 0x000E
|
@@ -91,16 +109,18 @@ def _setup_ci_prerequisites(self):
|
91 | 109 | logging.info("Temporary storage directory: %s", self.storage.name)
|
92 | 110 |
|
93 | 111 | self.th_server_port = 5544
|
94 |
| - self.th_server_discriminator = random.randint(0, 4095) |
| 112 | + self.th_server_setup_params = SetupParameters( |
| 113 | + discriminator=random.randint(0, 4095), |
| 114 | + passcode=20202021) |
95 | 115 | self.th_server_passcode = 20202021
|
96 | 116 |
|
97 | 117 | # Start the server app.
|
98 | 118 | self.th_server = AppServerSubprocess(
|
99 | 119 | th_server_app,
|
100 | 120 | storage_dir=self.storage.name,
|
101 | 121 | port=self.th_server_port,
|
102 |
| - discriminator=self.th_server_discriminator, |
103 |
| - passcode=self.th_server_passcode) |
| 122 | + discriminator=self.th_server_setup_params.discriminator, |
| 123 | + passcode=self.th_server_setup_params.passcode) |
104 | 124 | self.th_server.start(
|
105 | 125 | expected_output="Server initialization complete",
|
106 | 126 | timeout=30)
|
@@ -161,7 +181,10 @@ async def test_TC_ECOINFO_2_2(self):
|
161 | 181 | self.wait_for_user_input("Add a bridged device using method indicated by the manufacturer")
|
162 | 182 | else:
|
163 | 183 | # Add some server to the DUT_FSA's Aggregator/Bridge.
|
164 |
| - self.dut_fsa_stdin.write(f"pairing onnetwork 2 {self.th_server_passcode}\n") |
| 184 | + if self.user_params.get("unified_fabric_sync_app"): |
| 185 | + self.dut_fsa_stdin.write(f"app pair-device 2 {self.th_server_setup_params.qr_code}\n") |
| 186 | + else: |
| 187 | + self.dut_fsa_stdin.write(f"pairing onnetwork 2 {self.th_server_setup_params.passcode}\n") |
165 | 188 | self.dut_fsa_stdin.flush()
|
166 | 189 | # Wait for the commissioning to complete.
|
167 | 190 | await asyncio.sleep(5)
|
@@ -200,7 +223,10 @@ async def test_TC_ECOINFO_2_2(self):
|
200 | 223 | self.wait_for_user_input("Removed bridged device added in step 2a using method indicated by the manufacturer")
|
201 | 224 | else:
|
202 | 225 | # Remove previously added server from the DUT_FSA's Aggregator/Bridge.
|
203 |
| - self.dut_fsa_stdin.write("pairing unpair 2\n") |
| 226 | + if self.user_params.get("unified_fabric_sync_app"): |
| 227 | + self.dut_fsa_stdin.write("app remove-device 2\n") |
| 228 | + else: |
| 229 | + self.dut_fsa_stdin.write("pairing unpair 2\n") |
204 | 230 | self.dut_fsa_stdin.flush()
|
205 | 231 | # Wait for the command to complete.
|
206 | 232 | await asyncio.sleep(2)
|
|
0 commit comments