|
18 | 18 | # for details about the block below.
|
19 | 19 | #
|
20 | 20 | # === BEGIN CI TEST ARGUMENTS ===
|
21 |
| -# test-runner-runs: run1 |
| 21 | +# test-runner-runs: run1 run2 run3 run4 |
| 22 | +# |
22 | 23 | # test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
|
23 | 24 | # test-runner-run/run1/factoryreset: True
|
24 | 25 | # test-runner-run/run1/quiet: True
|
25 | 26 | # test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
|
26 |
| -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values |
| 27 | +# test-runner-run/run1/script-args: --endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values |
| 28 | +# |
| 29 | +# test-runner-run/run2/app: ${ALL_CLUSTERS_APP} |
| 30 | +# test-runner-run/run2/factoryreset: True |
| 31 | +# test-runner-run/run2/quiet: True |
| 32 | +# test-runner-run/run2/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json |
| 33 | +# test-runner-run/run2/script-args: --endpoint 2 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values |
| 34 | +# |
| 35 | +# test-runner-run/run3/app: ${ALL_CLUSTERS_APP} |
| 36 | +# test-runner-run/run3/factoryreset: True |
| 37 | +# test-runner-run/run3/quiet: True |
| 38 | +# test-runner-run/run3/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json |
| 39 | +# test-runner-run/run3/script-args: --endpoint 3 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values |
| 40 | +# |
| 41 | +# test-runner-run/run4/app: ${ALL_CLUSTERS_APP} |
| 42 | +# test-runner-run/run4/factoryreset: True |
| 43 | +# test-runner-run/run4/quiet: True |
| 44 | +# test-runner-run/run4/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json |
| 45 | +# test-runner-run/run4/script-args: --endpoint 4 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values |
| 46 | +# |
27 | 47 | # === END CI TEST ARGUMENTS ===
|
| 48 | +# |
| 49 | +# These tests run on every endpoint regardless of whether a switch is present because they are set up to auto-select. |
28 | 50 |
|
29 | 51 | import json
|
30 | 52 | import logging
|
|
40 | 62 | from chip.tlv import uint
|
41 | 63 | from matter_testing_support import (ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest, TestStep,
|
42 | 64 | await_sequence_of_reports, default_matter_test_main, has_feature,
|
43 |
| - run_for_each_matching_endpoint) |
| 65 | + run_if_endpoint_matches) |
44 | 66 | from mobly import asserts
|
45 | 67 |
|
46 | 68 | logger = logging.getLogger(__name__)
|
@@ -261,7 +283,7 @@ def steps_TC_SWTCH_2_2(self):
|
261 | 283 | TestStep(10, "TH reads the CurrentPosition attribute from the DUT", "Verify that the value is 0"),
|
262 | 284 | ]
|
263 | 285 |
|
264 |
| - @run_for_each_matching_endpoint(has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kLatchingSwitch)) |
| 286 | + @run_if_endpoint_matches(has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kLatchingSwitch)) |
265 | 287 | async def test_TC_SWTCH_2_2(self):
|
266 | 288 | post_prompt_settle_delay_seconds = 10.0
|
267 | 289 |
|
@@ -347,7 +369,7 @@ def steps_TC_SWTCH_2_3(self):
|
347 | 369 | TestStep(9, "TH reads the CurrentPosition attribute from the DUT", "Verify that the value is 0"),
|
348 | 370 | ]
|
349 | 371 |
|
350 |
| - @run_for_each_matching_endpoint(has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kMomentarySwitch)) |
| 372 | + @run_if_endpoint_matches(has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kMomentarySwitch)) |
351 | 373 | async def test_TC_SWTCH_2_3(self):
|
352 | 374 | # Commissioning - already done
|
353 | 375 | self.step(1)
|
@@ -426,7 +448,7 @@ def steps_TC_SWTCH_2_4(self):
|
426 | 448 | """)
|
427 | 449 | ]
|
428 | 450 |
|
429 |
| - @run_for_each_matching_endpoint(has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kMomentarySwitch)) |
| 451 | + @run_if_endpoint_matches(has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kMomentarySwitch)) |
430 | 452 | async def test_TC_SWTCH_2_4(self):
|
431 | 453 | switch_pressed_position = self._default_pressed_position
|
432 | 454 | post_prompt_settle_delay_seconds = 10.0
|
@@ -599,7 +621,7 @@ def should_run_SWTCH_2_5(wildcard, endpoint):
|
599 | 621 | asf = has_feature(Clusters.Switch, 0x20)
|
600 | 622 | return msm(wildcard, endpoint) and not asf(wildcard, endpoint)
|
601 | 623 |
|
602 |
| - @run_for_each_matching_endpoint(should_run_SWTCH_2_5) |
| 624 | + @run_if_endpoint_matches(should_run_SWTCH_2_5) |
603 | 625 | async def test_TC_SWTCH_2_5(self):
|
604 | 626 | # Commissioning - already done
|
605 | 627 | self.step(1)
|
@@ -774,7 +796,7 @@ def should_run_SWTCH_2_6(wildcard, endpoint):
|
774 | 796 | asf = has_feature(Clusters.Switch, 0x20)
|
775 | 797 | return msm(wildcard, endpoint) and asf(wildcard, endpoint)
|
776 | 798 |
|
777 |
| - @run_for_each_matching_endpoint(should_run_SWTCH_2_6) |
| 799 | + @run_if_endpoint_matches(should_run_SWTCH_2_6) |
778 | 800 | async def test_TC_SWTCH_2_6(self):
|
779 | 801 | # Commissioning - already done
|
780 | 802 | self.step(1)
|
|
0 commit comments