From f1affadde0647cc882c2e36ebb95b4ec2339d9a5 Mon Sep 17 00:00:00 2001 From: James Swan Date: Tue, 11 Feb 2025 22:31:02 +0000 Subject: [PATCH] test: Update TC_TSTAT_2_2.py for v1.4.1 compatibility Make two compatibility changes for v1.4.1 build: 1. Change import path from 'chip.testing.matter_testing' to 'matter_testing_support' to fix import resolution 2. Reformat CI Test Arguments header block to use legacy parser format (single-line arguments instead of nested YAML structure) Old path: chip.testing.matter_testing New path: matter_testing_support Parser compatibility: - Flattened nested YAML structure in CI Test Arguments - Changed 'factory-reset' to 'factoryreset' for parser support - Maintained all original test parameters and values Testing: - Verified successful build on v1.4.1 - Validated CI Test Arguments parsing --- src/python_testing/TC_TSTAT_2_2.py | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/python_testing/TC_TSTAT_2_2.py b/src/python_testing/TC_TSTAT_2_2.py index f4e1dfbc2b70d3..02fc9c2ff3c4df 100644 --- a/src/python_testing/TC_TSTAT_2_2.py +++ b/src/python_testing/TC_TSTAT_2_2.py @@ -18,27 +18,19 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: -# run1: -# app: ${ALL_CLUSTERS_APP} -# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# script-args: > -# --storage-path admin_storage.json -# --commissioning-method on-network -# --discriminator 1234 -# --passcode 20202021 -# --endpoint 1 -# --trace-to json:${TRACE_TEST_JSON}.json -# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factory-reset: true -# quiet: true +# test-runner-runs: run1 +# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/quiet: True # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import Status -from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts logger = logging.getLogger(__name__)