From 7f643578646816056f9ce73ce69fac039d43d0ee Mon Sep 17 00:00:00 2001 From: Vatsal Ghelani Date: Thu, 26 Sep 2024 11:10:31 -0400 Subject: [PATCH 1/2] Removed Test*.py scripts from excluded list and made it run via glob python test run script --- .github/workflows/tests.yaml | 7 ------- src/python_testing/TestChoiceConformanceSupport.py | 4 ++++ src/python_testing/TestConformanceSupport.py | 4 ++++ src/python_testing/TestConformanceTest.py | 4 ++++ src/python_testing/TestIdChecks.py | 4 ++++ src/python_testing/TestMatterTestingSupport.py | 4 ++++ src/python_testing/TestSpecParsingDeviceType.py | 5 +++++ src/python_testing/TestSpecParsingSupport.py | 7 ++++++- 8 files changed, 31 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d14d188a2fb6e4..be15f992f0b8fb 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -518,13 +518,6 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/controller/python/test/test_scripts/mobile-device-test.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/execute_python_tests.py --env-file /tmp/test_env.yaml --search-directory src/python_testing' scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py --all-clusters out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die/chip-all-clusters-app' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestIdChecks.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingDeviceType.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceSupport.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceTest.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestChoiceConformanceSupport.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestMatterTestingSupport.py' - scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingSupport.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_ICDM_2_1.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_IDM_10_4.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_SC_7_1.py' diff --git a/src/python_testing/TestChoiceConformanceSupport.py b/src/python_testing/TestChoiceConformanceSupport.py index 8436bc8418a804..62016c0907c318 100644 --- a/src/python_testing/TestChoiceConformanceSupport.py +++ b/src/python_testing/TestChoiceConformanceSupport.py @@ -15,6 +15,10 @@ # limitations under the License. # +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# === END CI TEST ARGUMENTS === + import itertools import xml.etree.ElementTree as ElementTree diff --git a/src/python_testing/TestConformanceSupport.py b/src/python_testing/TestConformanceSupport.py index 3744b6fe5e70d5..26dc5aeaba8577 100644 --- a/src/python_testing/TestConformanceSupport.py +++ b/src/python_testing/TestConformanceSupport.py @@ -15,6 +15,10 @@ # limitations under the License. # +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# === END CI TEST ARGUMENTS === + import xml.etree.ElementTree as ElementTree from typing import Callable diff --git a/src/python_testing/TestConformanceTest.py b/src/python_testing/TestConformanceTest.py index f0ff8032eab519..f9cfbe168e6d54 100644 --- a/src/python_testing/TestConformanceTest.py +++ b/src/python_testing/TestConformanceTest.py @@ -15,6 +15,10 @@ # limitations under the License. # +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# === END CI TEST ARGUMENTS === + from typing import Any import chip.clusters as Clusters diff --git a/src/python_testing/TestIdChecks.py b/src/python_testing/TestIdChecks.py index 8969807d5819e3..89ee814628e788 100644 --- a/src/python_testing/TestIdChecks.py +++ b/src/python_testing/TestIdChecks.py @@ -15,6 +15,10 @@ # limitations under the License. # +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# === END CI TEST ARGUMENTS === + from global_attribute_ids import (AttributeIdType, ClusterIdType, DeviceTypeIdType, attribute_id_type, cluster_id_type, device_type_id_type, is_valid_attribute_id, is_valid_cluster_id, is_valid_device_type_id) from matter_testing_support import MatterBaseTest, default_matter_test_main diff --git a/src/python_testing/TestMatterTestingSupport.py b/src/python_testing/TestMatterTestingSupport.py index d2a259f154adc6..8e787b9225c3c6 100644 --- a/src/python_testing/TestMatterTestingSupport.py +++ b/src/python_testing/TestMatterTestingSupport.py @@ -15,6 +15,10 @@ # limitations under the License. # +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# === END CI TEST ARGUMENTS === + import os import time import typing diff --git a/src/python_testing/TestSpecParsingDeviceType.py b/src/python_testing/TestSpecParsingDeviceType.py index 7729ccee8af24d..40cb399fed0a70 100644 --- a/src/python_testing/TestSpecParsingDeviceType.py +++ b/src/python_testing/TestSpecParsingDeviceType.py @@ -14,6 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# === END CI TEST ARGUMENTS === + import xml.etree.ElementTree as ElementTree import chip.clusters as Clusters diff --git a/src/python_testing/TestSpecParsingSupport.py b/src/python_testing/TestSpecParsingSupport.py index c7f087cb03d834..fe50d4bb94e654 100644 --- a/src/python_testing/TestSpecParsingSupport.py +++ b/src/python_testing/TestSpecParsingSupport.py @@ -15,6 +15,10 @@ # limitations under the License. # +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# === END CI TEST ARGUMENTS === + import os import xml.etree.ElementTree as ElementTree @@ -37,7 +41,8 @@ def single_attribute_cluster_xml(read_access: str, write_access: str, write_supported: str): - xml_cluster = f'' + xml_cluster = f'' revision_table = ('' '' '' From 7e40f890555826ff7ea988d247ee48487df0e19f Mon Sep 17 00:00:00 2001 From: Vatsal Ghelani <152916324+vatsalghelani-csa@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:32:01 -0400 Subject: [PATCH 2/2] Update TestSpecParsingSupport.py for formatting distorted by vscode --- src/python_testing/TestSpecParsingSupport.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/python_testing/TestSpecParsingSupport.py b/src/python_testing/TestSpecParsingSupport.py index fe50d4bb94e654..5b4ca89f5fc2b1 100644 --- a/src/python_testing/TestSpecParsingSupport.py +++ b/src/python_testing/TestSpecParsingSupport.py @@ -41,8 +41,7 @@ def single_attribute_cluster_xml(read_access: str, write_access: str, write_supported: str): - xml_cluster = f'' + xml_cluster = f'' revision_table = ('' '' ''