Skip to content

Commit a2b1f6b

Browse files
vatsalghelani-csarestyled-commits
authored andcommitted
Updates comments for the excluded python test scripts based on their current status in the CI pipeline (project-chip#35660)
* Script updated with comments on why the scripts have been included from the glob run * Restyled by autopep8 * Removed exclusion test script explanation * Fixed comments on the test scripts * Fix excluded scripts for adding support scripts still in the directory --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 7b716ef commit a2b1f6b

File tree

1 file changed

+47
-57
lines changed

1 file changed

+47
-57
lines changed

src/python_testing/execute_python_tests.py

+47-57
Original file line numberDiff line numberDiff line change
@@ -55,66 +55,56 @@ def main(search_directory, env_file):
5555

5656
# Define the files and patterns to exclude
5757
excluded_patterns = {
58-
"MinimalRepresentation.py",
59-
"TC_CNET_4_4.py",
60-
"TC_CCTRL_2_1.py",
61-
"TC_CCTRL_2_2.py",
62-
"TC_CCTRL_2_3.py",
63-
"TC_DGGEN_3_2.py",
64-
"TC_EEVSE_Utils.py",
65-
"TC_ECOINFO_2_1.py",
66-
"TC_ECOINFO_2_2.py",
67-
"TC_EWATERHTRBase.py",
68-
"TC_EWATERHTR_2_1.py",
69-
"TC_EWATERHTR_2_2.py",
70-
"TC_EWATERHTR_2_3.py",
71-
"TC_EnergyReporting_Utils.py",
72-
"TC_OpstateCommon.py",
73-
"TC_pics_checker.py",
74-
"TC_TMP_2_1.py",
75-
"TC_MCORE_FS_1_1.py",
76-
"TC_MCORE_FS_1_2.py",
77-
"TC_MCORE_FS_1_3.py",
78-
"TC_MCORE_FS_1_4.py",
79-
"TC_MCORE_FS_1_5.py",
80-
"TC_OCC_3_1.py",
81-
"TC_OCC_3_2.py",
82-
"TC_BRBINFO_4_1.py",
83-
"TestCommissioningTimeSync.py",
84-
"TestConformanceSupport.py",
85-
"TestChoiceConformanceSupport.py",
86-
"TC_DEMTestBase.py",
87-
"choice_conformance_support.py",
88-
"TestConformanceTest.py", # Unit test of the conformance test (TC_DeviceConformance) - does not run against an app.
89-
"TestIdChecks.py",
90-
"TestSpecParsingDeviceType.py",
91-
"TestConformanceTest.py",
92-
"TestMatterTestingSupport.py",
93-
"TestSpecParsingSupport.py",
94-
"TestTimeSyncTrustedTimeSource.py",
95-
"basic_composition_support.py",
96-
"conformance_support.py",
97-
"drlk_2_x_common.py",
58+
"MinimalRepresentation.py", # Code/Test not being used or not shared code for any other tests
59+
"TC_CNET_4_4.py", # It has no CI execution block, is not executed in CI
60+
"TC_CCTRL_2_1.py", # They rely on example applications that inter-communicate and there is no example app that works right now
61+
"TC_CCTRL_2_2.py", # They rely on example applications that inter-communicate and there is no example app that works right now
62+
"TC_CCTRL_2_3.py", # They rely on example applications that inter-communicate and there is no example app that works right now
63+
"TC_DGGEN_3_2.py", # src/python_testing/test_testing/test_TC_DGGEN_3_2.py is the Unit test of this test
64+
"TC_EEVSE_Utils.py", # Shared code for TC_EEVSE, not a standalone test
65+
"TC_ECOINFO_2_1.py", # They rely on example applications that inter-communicate and there is no example app that works right now
66+
"TC_ECOINFO_2_2.py", # They rely on example applications that inter-communicate and there is no example app that works right now
67+
"TC_EWATERHTRBase.py", # Shared code for TC_EWATERHTR, not a standalone test
68+
"TC_EnergyReporting_Utils.py", # Shared code for TC_EEM and TC_EPM, not a standalone test
69+
"TC_OpstateCommon.py", # Shared code for TC_OPSTATE, not a standalone test
70+
"TC_pics_checker.py", # Currently isn't enabled because we don't have any examples with conformant PICS
71+
"TC_TMP_2_1.py", # src/python_testing/test_testing/test_TC_TMP_2_1.py is the Unit test of this test
72+
"TC_MCORE_FS_1_1.py", # This test requires a TH_SERVER application, hence not ready run with CI
73+
"TC_MCORE_FS_1_2.py", # This test requires a TH_SERVER application, hence not ready run with CI
74+
"TC_MCORE_FS_1_3.py", # This test requires a TH_SERVER application, hence not ready run with CI
75+
"TC_MCORE_FS_1_4.py", # This test requires a TH_SERVER application, hence not ready run with CI
76+
"TC_MCORE_FS_1_5.py", # This test requires a TH_SERVER application, hence not ready run with CI
77+
"TC_OCC_3_1.py", # There are CI issues for the test cases that implements manually controlling sensor device for the occupancy state ON/OFF change
78+
"TC_OCC_3_2.py", # There are CI issues for the test cases that implements manually controlling sensor device for the occupancy state ON/OFF change
79+
"TC_BRBINFO_4_1.py", # This test requires a TH_ICD_SERVER application, hence not ready run with CI
80+
"TestCommissioningTimeSync.py", # Code/Test not being used or not shared code for any other tests
81+
"TestConformanceSupport.py", # Unit test - does not run against an app
82+
"TestChoiceConformanceSupport.py", # Unit test - does not run against an app
83+
"TC_DEMTestBase.py", # Shared code for TC_DEM, not a standalone test
84+
"TestConformanceTest.py", # Unit test of the conformance test (TC_DeviceConformance) - does not run against an app
85+
"TestIdChecks.py", # Unit test - does not run against an app
86+
"TestSpecParsingDeviceType.py", # Unit test - does not run against an app
87+
"TestConformanceTest.py", # Unit test - does not run against an app
88+
"TestMatterTestingSupport.py", # Unit test - does not run against an app
89+
"TestSpecParsingSupport.py", # Unit test - does not run against an app
90+
"TestTimeSyncTrustedTimeSource.py", # Unit test and shared code for scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py
91+
"drlk_2_x_common.py", # Shared code for TC_DRLK, not a standalone test
92+
# Python code that runs all the python tests from src/python_testing (This code itself run via tests.yaml)
9893
"execute_python_tests.py",
99-
"global_attribute_ids.py",
100-
"hello_external_runner.py",
101-
"hello_test.py",
102-
"matter_testing_support.py",
103-
"pics_support.py",
104-
"spec_parsing_support.py",
105-
"taglist_and_topology_test_support.py",
106-
"test_plan_support.py",
107-
"test_plan_table_generator.py"
94+
"hello_external_runner.py", # Code/Test not being used or not shared code for any other tests
95+
"hello_test.py", # Is a template for tests
96+
"test_plan_support.py", # Shared code for TC_*, not a standalone test
97+
"test_plan_table_generator.py", # Code/Test not being used or not shared code for any other tests
98+
"basic_composition_support.py", # Test support/shared code script, not a standalone test
99+
"choice_conformance_support.py", # Test support/shared code script, not a standalone test
100+
"conformance_support.py", # Test support/shared code script, not a standalone test
101+
"global_attribute_ids.py", # Test support/shared code script, not a standalone test
102+
"matter_testing_support.py", # Test support/shared code script, not a standalone test
103+
"pics_support.py", # Test support/shared code script, not a standalone test
104+
"spec_parsing_support.py", # Test support/shared code script, not a standalone test
105+
"taglist_and_topology_test_support.py" # Test support/shared code script, not a standalone test
108106
}
109107

110-
"""
111-
Explanation for excluded files:
112-
The above list of files are excluded from the tests as they are either not app-specific tests
113-
or are run through a different block of tests mentioned in tests.yaml.
114-
This is to ensure that only relevant test scripts are executed, avoiding redundancy and ensuring
115-
the correctness of the test suite.
116-
"""
117-
118108
# Get all .py files in the directory
119109
all_python_files = glob.glob(os.path.join(search_directory, "*.py"))
120110

0 commit comments

Comments
 (0)