Skip to content

Commit

Permalink
test: Update TC_TSTAT_2_2.py for v1.4.1 compatibility
Browse files Browse the repository at this point in the history
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
  • Loading branch information
swan-amazon committed Feb 11, 2025
1 parent 7d67dc9 commit f1affad
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions src/python_testing/TC_TSTAT_2_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down

0 comments on commit f1affad

Please sign in to comment.