Skip to content

Commit 49987b0

Browse files
Introduced a python script (execute_python_tests.py) that automates the execution of python test scripts within the python_testing directory (#34377)
* Adding the python script to glob the python_testing folder on executing necessary tests * Removed the baed command temp file while inhertiing it from the tests.yaml script * Fixed the extra script execution part * Fixes to the script * Fixed the python script with correct command * Fixed the doyenv module not found error * Restyled by autopep8 * Restyled by isort * Fixed the script as per comments added to the code review * Restyled by autopep8 * Restyled by isort * Fixed the comment review * Restyled by autopep8 * Added the argument design patterns for TC_BOOLCFG* and TC_VALCC* scripts * Added --hex-arg as argument needed for TC_BOOLCFG tests * Revert "Added --hex-arg as argument needed for TC_BOOLCFG tests" This reverts commit 0764957. * Undo submodule change * Fixed the --hex-arg argument * Fixed arguments according to test requirement * Excluded new script added since it is run via python3 directly * Fixed .py of the exclusion script * Added fixes to the script arguments and new scripts run * Removed support test to run * REPL Tests - Linux run * Excluded recently added DEMTEst support python from all script execution * Excluded tests yet not ready for CI * Excluded the support test for TC_EWATERHTR * Excluded not ready tests * Fix file * Fix file comma formatting --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 3a5e3db commit 49987b0

21 files changed

+301
-106
lines changed

.github/workflows/tests.yaml

+1-106
Large diffs are not rendered by default.

src/python_testing/TC_ACL_2_2.py

+10
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17+
18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1727
import chip.clusters as Clusters
1828
from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main
1929
from mobly import asserts

src/python_testing/TC_BOOLCFG_2_1.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import functools
1928
import logging
2029
from operator import ior

src/python_testing/TC_BOOLCFG_3_1.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928
from random import choice
2029

src/python_testing/TC_BOOLCFG_4_1.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928

2029
import chip.clusters as Clusters

src/python_testing/TC_BOOLCFG_4_2.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --enable-key 000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_APP}.json
24+
# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928

2029
import chip.clusters as Clusters

src/python_testing/TC_BOOLCFG_4_3.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --enable-key 000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_APP}.json
24+
# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928

2029
import chip.clusters as Clusters

src/python_testing/TC_BOOLCFG_4_4.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --enable-key 000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_APP}.json
24+
# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928

2029
import chip.clusters as Clusters

src/python_testing/TC_BOOLCFG_5_1.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --enable-key 000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_APP}.json
24+
# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928

2029
import chip.clusters as Clusters

src/python_testing/TC_BOOLCFG_5_2.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --enable-key 000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_APP}.json
24+
# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928

2029
import chip.clusters as Clusters

src/python_testing/TC_VALCC_2_1.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928

2029
import chip.clusters as Clusters

src/python_testing/TC_VALCC_3_1.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import time
1928

2029
import chip.clusters as Clusters

src/python_testing/TC_VALCC_3_2.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928
import time
2029

src/python_testing/TC_VALCC_3_3.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928
import time
2029

src/python_testing/TC_VALCC_3_4.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928

2029
import chip.clusters as Clusters

src/python_testing/TC_VALCC_4_1.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import time
1928

2029
import chip.clusters as Clusters

src/python_testing/TC_VALCC_4_2.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928
import time
2029

src/python_testing/TC_VALCC_4_3.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928

2029
import chip.clusters as Clusters

src/python_testing/TC_VALCC_4_4.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import logging
1928

2029
import chip.clusters as Clusters

src/python_testing/TC_VALCC_4_5.py

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
# limitations under the License.
1616
#
1717

18+
# === BEGIN CI TEST ARGUMENTS ===
19+
# test-runner-runs: run1
20+
# test-runner-run/run1/app: ${ALL_CLUSTERS_APP}
21+
# test-runner-run/run1/factoryreset: True
22+
# test-runner-run/run1/quiet: True
23+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
24+
# 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
25+
# === END CI TEST ARGUMENTS ===
26+
1827
import time
1928

2029
import chip.clusters as Clusters

0 commit comments

Comments
 (0)