From bf7b30ccd8779e7cde7cea06d818fc6018da2065 Mon Sep 17 00:00:00 2001 From: Vatsal Ghelani <152916324+vatsalghelani-csa@users.noreply.github.com> Date: Wed, 7 Aug 2024 19:33:13 -0400 Subject: [PATCH] Fix the tests.yaml to run the execution script for running python test scripts (#34853) * Fix the script execution link to run test scripts * Fixed the CI arguments design pattern for TC_EWATERHTR scripts * Excluded the scripts still under fixes * Removed TC_SEAR tests which were still undecided on the CI arguments * Removed TC_OCC_3_1 and TC_OCC_3_2 since there are CI issues to be followed up for the test cases below that implements manually controlling sensor device for the occupancy state ON/OFF change --- .github/workflows/tests.yaml | 1 + src/python_testing/TC_EWATERHTR_2_1.py | 3 ++- src/python_testing/TC_EWATERHTR_2_2.py | 3 ++- src/python_testing/TC_EWATERHTR_2_3.py | 3 ++- src/python_testing/execute_python_tests.py | 10 ++++++++++ 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 72080ea65ad772..6974999d0d134f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -506,6 +506,7 @@ jobs: run: | mkdir -p out/trace_data 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/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestSpecParsingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py' diff --git a/src/python_testing/TC_EWATERHTR_2_1.py b/src/python_testing/TC_EWATERHTR_2_1.py index c278da6c094010..c50a082ae2afa1 100644 --- a/src/python_testing/TC_EWATERHTR_2_1.py +++ b/src/python_testing/TC_EWATERHTR_2_1.py @@ -18,7 +18,8 @@ # See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments # for details about the block below. # -# === BEGIN CI TEST ARGUMENTS ===# test-runner-runs: run1 +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 # test-runner-run/run1/app: ${ALL_CLUSTERS_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True diff --git a/src/python_testing/TC_EWATERHTR_2_2.py b/src/python_testing/TC_EWATERHTR_2_2.py index 0d20e1d4af97f4..7ce8c815a63a3b 100644 --- a/src/python_testing/TC_EWATERHTR_2_2.py +++ b/src/python_testing/TC_EWATERHTR_2_2.py @@ -18,7 +18,8 @@ # See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments # for details about the block below. # -# === BEGIN CI TEST ARGUMENTS ===# test-runner-runs: run1 +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 # test-runner-run/run1/app: ${ALL_CLUSTERS_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True diff --git a/src/python_testing/TC_EWATERHTR_2_3.py b/src/python_testing/TC_EWATERHTR_2_3.py index b9572c9520d843..b3ed4bdc252cb4 100644 --- a/src/python_testing/TC_EWATERHTR_2_3.py +++ b/src/python_testing/TC_EWATERHTR_2_3.py @@ -17,7 +17,8 @@ # See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments # for details about the block below. # -# === BEGIN CI TEST ARGUMENTS ===# test-runner-runs: run1 +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 # test-runner-run/run1/app: ${ALL_CLUSTERS_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True diff --git a/src/python_testing/execute_python_tests.py b/src/python_testing/execute_python_tests.py index 61b650a8078693..ad3fc83c910bf8 100644 --- a/src/python_testing/execute_python_tests.py +++ b/src/python_testing/execute_python_tests.py @@ -64,6 +64,9 @@ def main(search_directory, env_file): "TC_ECOINFO_2_1.py", "TC_ECOINFO_2_2.py", "TC_EWATERHTRBase.py", + "TC_EWATERHTR_2_1.py", + "TC_EWATERHTR_2_2.py", + "TC_EWATERHTR_2_3.py", "TC_EnergyReporting_Utils.py", "TC_OpstateCommon.py", "TC_pics_checker.py", @@ -71,7 +74,14 @@ def main(search_directory, env_file): "TC_MCORE_FS_1_1.py", "TC_MCORE_FS_1_2.py", "TC_MCORE_FS_1_3.py", + "TC_OCC_3_1.py", + "TC_OCC_3_2.py", "TC_BRBINFO_4_1.py", + "TC_SEAR_1_2.py", + "TC_SEAR_1_3.py", + "TC_SEAR_1_4.py", + "TC_SEAR_1_5.py", + "TC_SEAR_1_6.py", "TestCommissioningTimeSync.py", "TestConformanceSupport.py", "TestChoiceConformanceSupport.py",