Skip to content

Commit d7c2bb2

Browse files
greensrquiduteantonio-amjrhiltonlimaccruzagralopes
authored
Merge V2.15.1-develop into main (#365)
* Updated SDK SHA - revert * Changed SDK_DOCKER_TAG to f2e5de7_latest * Make all TH dependencies not static (#164) * Updated package-dependency-list.txt * Updated missing dependencies * [FIX] Reverting the OTBR Start Script (#150) * Reverting the BR_VARIANT option to the otbr start script * Adding TODO to the script * Adding missing comment char * Updating Script Comment Year Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Adding switch parameters options to the script --------- Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Do not error while parsing SDK python tests (#141) * replace erro with warning * Update test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * black error fix * pr review --------- Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Add TC-IDM-10.5 test case to mandatory suite (#153) * Check user prompt answer FAILED for DUT commissioning (#155) * Handle Skip test fir old script python test cases (#154) * [FIX] Intermittent Tests Start Error With No Information (#157) * Fixing intermittent problem with Python's Base Manager Creating the manager now only once in the SDK Container Init * Refactoring and updating the unit tests with related mocks * Update python_testing references after SDK refactoring (#162) * Updated python_testing references after sdk refactoring * Removed no wanted file changes * Updated matter_testing references * Fixed line too long * Fixed code - black * Updated SDK SHA * Removed commented code * Revert "[FIX] Intermittent Tests Start Error With No Information (#157)" (#166) This reverts commit 316a934d45d94f177c3525d3d9cd8b6718e81014. * 01 - Isolate SDK docker pull script (#142) * Isolate SDK docker pull script * Changes after code review --------- Co-authored-by: Romulo Quidute Filho <rquidute@apple.com> * 02 - Script to parser SDK python tests (#144) * Isolate SDK docker pull script * Rebasing * Apply suggestions from code review Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Move call tp update-pull-sdk-docker-image.sh from setup.sh to update-sample-apps.sh * Changes after code review * Fixed CI issues * Code review fixes * Fixed unit tests * Fixed mypy --------- Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> Co-authored-by: Romulo Quidute Filho <rquidute@apple.com> * Implemented changes for custom python test (#167) * Implemented changes for custom python test * code review * Code review * Code reviewd * Fixed code violations * Chanegs after code review * Remove unused import * Update update-sample-app script to copy apps from new origin (#148) * Fix suite names for custom python tests (#168) * Fix move update-pull-sdk-docker-image script content to update-sample-app script (#169) * Fixed some python tests not listed (#172) * Fixed some python tests not listed * code review * [Feature] Implement support to export project config (#171) * Implement support to export project config * Fix mypy * Changed the returned schema and service endpoint name * Added import project config * Apply suggestions from code review Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * code review --------- Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * [FIX] Added support to negated PICS (#170) * Added support to negated PICS * Fixed flake * Code review. No consider negatives PICS * Update app/pics_applicable_test_cases.py * Code review * Fixes after merge * Remove unused file (#175) * Remove unused file * Updated cspell * Fix ci issues v 2 12 (#176) * Fix CI issues from v2.12 branch * Fixed merge * Fix test case * Updated SDK_DOCKER_IMAGE url * Updated SDK_DOCKER_IMAGE url * Add support for configuring terms and conditions in device commissioning (#173) * Add support for configuring terms and conditions in device commissioning This commit introduces a new `enhanced_setup_flow` configuration property to the test harness backend, allowing device manufacturers to define the terms and conditions (T&C) that must be acknowledged and set during device commissioning. These values are critical for supporting the Terms and Conditions Certification Test Suite. Key changes include: - Added the `EnhancedSetupFlowConfig` class to `DutConfig`, which allows specifying the T&C version and user response required during commissioning. - Updated `generate_command_arguments` in `utils.py` to append the necessary arguments for T&C validation and the device's commissioning method. - Adjusted model validation to ensure the `enhanced_setup_flow` field is processed correctly within `DutConfig`. These changes ensure the test harness can enforce manufacturer-specific T&C values during the commissioning process, aligning with the broader requirements of T&C validation. * * Ran ./scripts/format.sh * Update test_collections/matter/test_environment_config.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update app/user_prompt_support/uploaded_file_support.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/performance_tests/utils.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/models/utils.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/models/utils.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/__init__.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Revert changes to test_collections/matter/sdk_tests/support/performance_tests/utils.py * Restyle test_environment_config.py * test: Add in-test-commissioning-method parameter for manual commissioning validation Add new parameter to control commissioning flow during tests, allowing manual validation of the commissioning process instead of auto-commissioning. This enables test cases to verify terms and conditions acknowledgements during the commissioning flow. - Add in-test-commissioning-method parameter to test flags - Support manual commissioning flow validation - Enable testing of T&C acknowledgement scenarios * Add new field "enhanced_setup_flow" to exception message * Cherry-pick test_python_parser.py from origin/main * Cherry-pick python_test_parser.py from origin/main * Revert "Cherry-pick python_test_parser.py from origin/main" This reverts commit 5d65ce5c4fd8d8e6d67cad68ceea52b999f1dacd. * Revert "Cherry-pick test_python_parser.py from origin/main" This reverts commit 2cd99b7fde26e2d676a55c0b135d2618e89eda52. * Removed broken test `test_python_parser.py` * Revert "Removed broken test `test_python_parser.py`" This reverts commit 48c0e323bdaf8b07ba1b6e9dcd1ea24955ad2a05. --------- Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * chore: upgrade Node.js from v18.x to v20.x (#177) Updated Node.js installation source from setup_18.x to setup_20.x to align with Ubuntu 22.04 base image requirements * [Feature] DO NOT require commissioning every test (#178) * First implementation * Implement prompt and copy files from/to contanier * Unit tests * Updated SKA SHA * Unit test typo fixes * Mypy flake8 fixes * Mypy fixes * Update test_collections/matter/sdk_tests/support/python_testing/models/utils.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/utils.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Code review * Review fixes * Remove unused import --------- Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Add logs for project config (#179) * Add logs for project config * Updated cspell.json * Update app/test_engine/test_runner.py Co-authored-by: hiltonlima <116589806+hiltonlima@users.noreply.github.com> * Fixed unit test * Unit test * Unit test --------- Co-authored-by: hiltonlima <116589806+hiltonlima@users.noreply.github.com> * Implement rename test run execution name (#180) * Fix the checking for storage-path (#183) * Revert code changes related to SDK path refactoring (#186) * Refatoring prompts for recommissioning (#187) * Refatoring prompts for recommissioning * flake8 fixes * Changes after code review * Revert "Utilities stress stability (#146)" (#188) * Revert "Utilities stress stability (#146)" This reverts commit 1e042fa3d07714e43132f3dd16a9fb9d211f3fd2. * Fixing wrong reverts * Fixing two more reverts * Remove commissioning information when running YAML scripts (#189) * Fix CONTAINER_TH_CLIENT_EXEC path (#191) * Fix CONTAINER_TH_CLIENT_EXEC path * Code formating * Updated SDK SHA and Python Tests JSON (#192) * Removed unused count field at test_case_metadata (#193) * Add apps folder when copying apps from container to host * Version v2.12-beta2+spring2025 * Version v2.12-beta3+spring2025 * Add apps folder when copying apps from container to host (#194) * Add apps folder when copying apps from container to host * Version v2.12-beta2+spring2025 * Version v2.12-beta2+spring2025 * [FIX] Updating Performance Files (#182) * Fixing the utils script, one calls and a import from the performance tests files * Fixing isort and cspell checks * Fixing Unit tests and removing unnecessary folder and file (jupyter) * Fix starting backend without internet access. (#184) * Remove unused file (#175) * Remove unused file * Updated cspell * [FIX] Updating Performance Files (#182) * Fixing the utils script, one calls and a import from the performance tests files * Fixing isort and cspell checks * Fixing Unit tests and removing unnecessary folder and file (jupyter) * Remove unused file (#175) * Remove unused file * Updated cspell * Fix ci issues v 2 12 (#176) * Fix CI issues from v2.12 branch * Fixed merge * Fix test case * Updated SDK_DOCKER_IMAGE url * Updated SDK_DOCKER_IMAGE url * Add nfc-thread pairing mode (#185) * Added nfc-thread pairing mode. This mode doesn't need a discriminator. * Changed after black * Unit tests fixes * Fixed code violations --------- Co-authored-by: Romulo Quidute Filho <rquidute@apple.com> * [Fix] Recommissioning Refactoring to V1.5 (#190) * Refatoring prompts for recommissioning (#187) * Refatoring prompts for recommissioning * flake8 fixes * Changes after code review * Remove commissioning information when running YAML scripts (#189) --------- Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Updating SDK SHA to 7d67dc904758bb68989596f401a843a31e81911d in config * Updated SDK SHA * Redo code changes related to SDK path refactoring (#198) * Redo code changes related to SDK path refactoring * Putting back is_detach argument * Fix unit test --------- Co-authored-by: Romulo Quidute Filho <rquidute@apple.cpom> * Updated SDK SHA and update-sample-apps.sh * Updated sdk sha * Undo changes in update-sample-apps.sh * Utilities stress stability (#146) * draft 1 * Update * Fixing error related to multiple commissioning executions + enhancing logs * total, readcommissionininfo and discovery plots * added PASE plot and percentiles * Update PoC with support to Utility screen. * Adding support to analytics + enhancing container interface to support detach option. * Added backend service to generate summary for logDisplay * Removed unsued code * Addes URL report in response for performance_summary endpoint * Minor fixes * Fixing util method for the repeat feature of the performance tests * Merge alembic heads * Cast project config * Update method according to merged changes * Make logs directory if it doesn't exist * Add performance-logs to .gitignore * Adding the Log Display web application scripts for install, uninstall, start and stop operations * Adding support to Python Virtual Environment for the LogDisplay app scripts, plus minor changes * Fixing the repeat test feature for regular tests with more than one iteration * Removing configuration option for log folder in the LogDisplay tool for easier UX in the cost of less flexibility * Force the creation of logs/ directory as well for the LogDisplay output folder * Updating scripts and log generation to use environment variables for paths * Changing the container's log output folder for path binded with host * Updating the start script's path of the LogDisplay * Disabling SIGINT trap from the start script so the python script inside receive the Ctrl+C interruption * Adjustments on simulator script + moving matter_qa to outside endpoint + handling stress script location * Fixing lint issues. * Fix lint * fix additional lint issues * lint * fixing migration issues * Removing unnecessary code. * update log display feature. * adjustments --------- Co-authored-by: Fabio Maia <fabio_maia@apple.com> Co-authored-by: Romulo Quidute Filho <rquidute@apple.com> Co-authored-by: Antonio Melo Jr <a_junior@apple.com> Co-authored-by: Carolina Lopes <ccruzagralopes@apple.com> * Updated SDK SHA * Update SDK SHA * New Json for beta1 summer2025 release * Updating Beta 2 For Summer 2025 (#200) * Updating the SDK SHA * Updating the sample apps script * Updating the version information file * Removing unnecessary Jupyter folder and file * Updating the python tests information json file * Solving python black issue for github checks * Updated SDK_SHA. ble-wifi and ble-thread fixes * Change to be able to use NFC Commissioning in YAML test. (#201) * chore: upgrade Node.js from v18.x to v20.x (#177) Updated Node.js installation source from setup_18.x to setup_20.x to align with Ubuntu 22.04 base image requirements * [FIX] Updating Performance Files (#182) * Fixing the utils script, one calls and a import from the performance tests files * Fixing isort and cspell checks * Fixing Unit tests and removing unnecessary folder and file (jupyter) * Fix starting backend without internet access. (#184) * Remove unused file (#175) * Remove unused file * Updated cspell * Add support for configuring terms and conditions in device commissioning (#173) * Add support for configuring terms and conditions in device commissioning This commit introduces a new `enhanced_setup_flow` configuration property to the test harness backend, allowing device manufacturers to define the terms and conditions (T&C) that must be acknowledged and set during device commissioning. These values are critical for supporting the Terms and Conditions Certification Test Suite. Key changes include: - Added the `EnhancedSetupFlowConfig` class to `DutConfig`, which allows specifying the T&C version and user response required during commissioning. - Updated `generate_command_arguments` in `utils.py` to append the necessary arguments for T&C validation and the device's commissioning method. - Adjusted model validation to ensure the `enhanced_setup_flow` field is processed correctly within `DutConfig`. These changes ensure the test harness can enforce manufacturer-specific T&C values during the commissioning process, aligning with the broader requirements of T&C validation. * * Ran ./scripts/format.sh * Update test_collections/matter/test_environment_config.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update app/user_prompt_support/uploaded_file_support.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/performance_tests/utils.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/models/utils.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/models/utils.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/__init__.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Revert changes to test_collections/matter/sdk_tests/support/performance_tests/utils.py * Restyle test_environment_config.py * test: Add in-test-commissioning-method parameter for manual commissioning validation Add new parameter to control commissioning flow during tests, allowing manual validation of the commissioning process instead of auto-commissioning. This enables test cases to verify terms and conditions acknowledgements during the commissioning flow. - Add in-test-commissioning-method parameter to test flags - Support manual commissioning flow validation - Enable testing of T&C acknowledgement scenarios * Add new field "enhanced_setup_flow" to exception message * Cherry-pick test_python_parser.py from origin/main * Cherry-pick python_test_parser.py from origin/main * Revert "Cherry-pick python_test_parser.py from origin/main" This reverts commit 5d65ce5c4fd8d8e6d67cad68ceea52b999f1dacd. * Revert "Cherry-pick test_python_parser.py from origin/main" This reverts commit 2cd99b7fde26e2d676a55c0b135d2618e89eda52. * Removed broken test `test_python_parser.py` * Revert "Removed broken test `test_python_parser.py`" This reverts commit 48c0e323bdaf8b07ba1b6e9dcd1ea24955ad2a05. --------- Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * [Feature] DO NOT require commissioning every test (#178) * First implementation * Implement prompt and copy files from/to contanier * Unit tests * Updated SKA SHA * Unit test typo fixes * Mypy flake8 fixes * Mypy fixes * Update test_collections/matter/sdk_tests/support/python_testing/models/utils.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/utils.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Code review * Review fixes * Remove unused import --------- Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Add logs for project config (#179) * Add logs for project config * Updated cspell.json * Update app/test_engine/test_runner.py Co-authored-by: hiltonlima <116589806+hiltonlima@users.noreply.github.com> * Fixed unit test * Unit test * Unit test --------- Co-authored-by: hiltonlima <116589806+hiltonlima@users.noreply.github.com> * Implement rename test run execution name (#180) * Fix the checking for storage-path (#183) * [FIX] Updating Performance Files (#182) * Fixing the utils script, one calls and a import from the performance tests files * Fixing isort and cspell checks * Fixing Unit tests and removing unnecessary folder and file (jupyter) * Remove unused file (#175) * Remove unused file * Updated cspell * Fix ci issues v 2 12 (#176) * Fix CI issues from v2.12 branch * Fixed merge * Fix test case * Updated SDK_DOCKER_IMAGE url * Updated SDK_DOCKER_IMAGE url * Add logs for project config (#179) * Add logs for project config * Updated cspell.json * Update app/test_engine/test_runner.py Co-authored-by: hiltonlima <116589806+hiltonlima@users.noreply.github.com> * Fixed unit test * Unit test * Unit test --------- Co-authored-by: hiltonlima <116589806+hiltonlima@users.noreply.github.com> * Add logs for project config (#179) * Add logs for project config * Updated cspell.json * Update app/test_engine/test_runner.py Co-authored-by: hiltonlima <116589806+hiltonlima@users.noreply.github.com> * Fixed unit test * Unit test * Unit test --------- Co-authored-by: hiltonlima <116589806+hiltonlima@users.noreply.github.com> * Add nfc-thread pairing mode (#185) * Added nfc-thread pairing mode. This mode doesn't need a discriminator. * Changed after black * Unit tests fixes * Fixed code violations --------- Co-authored-by: Romulo Quidute Filho <rquidute@apple.com> * Add logs for project config (#179) * Add logs for project config * Updated cspell.json * Update app/test_engine/test_runner.py Co-authored-by: hiltonlima <116589806+hiltonlima@users.noreply.github.com> * Fixed unit test * Unit test * Unit test --------- Co-authored-by: hiltonlima <116589806+hiltonlima@users.noreply.github.com> * [Fix] Recommissioning Refactoring to V1.5 (#190) * Refatoring prompts for recommissioning (#187) * Refatoring prompts for recommissioning * flake8 fixes * Changes after code review * Remove commissioning information when running YAML scripts (#189) --------- Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Change to be able to use NFC Commissioning in YAML test. NB: Change for Python tests will be done in another PR. * Fixed the error found by black and Flake8. * Added comment --------- Co-authored-by: James Swan <122404367+swan-amazon@users.noreply.github.com> Co-authored-by: antonio-amjr <116589331+antonio-amjr@users.noreply.github.com> Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> Co-authored-by: hiltonlima <116589806+hiltonlima@users.noreply.github.com> Co-authored-by: Romulo Quidute Filho <rquidute@apple.com> * [FIX] Removing Performance Collection From PICS Validation (#202) * Removing Performance collection from PICS applicable tests validation * Using a test collection copy instead of the original dict to prevent losing data * [FIX] Fix Custom YAML test execution (#205) * Fix Custom YAML test execution * Fixed flake8 and spellcheck * Update test_collections/matter/sdk_tests/support/yaml_tests/matter_yaml_runner.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> --------- Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Copy mock_server from cert-bins to host (#206) * Copy mock_server from cert-bins to host * Update test_collections/matter/scripts/update-sample-apps.sh Co-authored-by: antonio-amjr <116589331+antonio-amjr@users.noreply.github.com> * Updated SDK-SHA - 6cc5fb1 --------- Co-authored-by: antonio-amjr <116589331+antonio-amjr@users.noreply.github.com> * Implement Project config changes due to platform certification support (#207) * Allow Json file to be uploaded * Updated SDK SHA * Updated code to parser new dmp file format (xml) * Some code refinements and unit tests * Code review * Code review * Isort fix * [Feature] Platform cert implementation - Updated applicable test cases (#209) * Initial coding for platform certification support - applicable test cases * Implemented Derived product certification flow - PLAT_CERT_DONE = True * Added unit tests * Add TODO to fetch platform-test.json from connectedhome ip repo * Undo changed in config.py * Fix mypy flake8 * Update app/pics_applicable_test_cases.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Update app/pics_applicable_test_cases.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Update app/tests/pics/test_applicable_test_cases_list.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Update app/pics_applicable_test_cases.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Fixes after tests * Update app/pics_applicable_test_cases.py * Code review --------- Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Use discriminator for nfc thread (#212) * Use discriminator for nfc_thread pairing * Undo discriminator as optional * Code review * Added platform-test.json as ignorePaths for cspell.json * Updated SDK_SHA to c60643c9a44ff6dfcc4319588e6fdec544c4a3e2 * Updated .version_information file * [FIX] Adding Timeout To Server Exit (#216) * Adding a fail-safe mechanism when stopping the chip server after a test execution * Returning missing while condition and adding a delay of 5 seconds between new tries * Fixing the while condition again and adding a log to the sleep delay in the logic * Rewording comment * Updated SDK_SHA - added air-purifier app * updated version to v2.13-beta3.1+summer2025 * Fix 1.5_in_progress missing folder (#217) * Added logs for applicable test cases (#218) * Adding the missing parameter to avoid the python's posicional argument error (#219) * Updating .version_information of backend * Copying credentials folder from SDK image * Updating version information * Fixed some platform tests not being added to applicable test cases (#220) * Fixed some platform tests not being added to applicable test cases * Code review * mypy fix * Code review * Improve platform test selection * Update app/pics_applicable_test_cases.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> --------- Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Fix platform-test.json read path * [Fix] Linter Error (#221) * Fixing linter's long line error * Removing two failing unit tests from platform Added a TODO comment with an open issue to address this problem. * Fixing flake issues * Returning missing parameter for Platform invalid json Unit Test * Move platform-test.json to collections folder (#223) * Move platform-test.json to collections folder * Fixed unused import and unit tests * Merge V2.13 sve+summer2025 into v2.13-develop (#231) * Changes for v2.13-beta4+summer2025 version (#224) * Changes for v2.13-beta4+summer2025 version * Updated path for platform-test.json file in cspell.json * Updated the affected sdk references (#226) * [Platform-Certification] Platform Certification List (#225) * Added the platform test list json and a Readme about the file in a folder in the repo root * Applying Gemini's comments * Moved the platform cert files to the matter folder * Update code due to platform test file location (#227) * Updated code after platform test location file is placed in new location * [Platform-Certification] Platform Certification List (#225) * Added the platform test list json and a Readme about the file in a folder in the repo root * Applying Gemini's comments * Moved the platform cert files to the matter folder * Fixed the right platform file path --------- Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> * Updated python_tests (#228) * Updated SDK SHA and python_tests_info.json for v2.13-beta4+summer2025 * New endpoint for CLI execution - Simplify the process (#229) * create /cli endpoint * Changes for v2.13-beta4+summer2025 version (#224) * Changes for v2.13-beta4+summer2025 version * Updated path for platform-test.json file in cspell.json * Updated the affected sdk references (#226) * [Platform-Certification] Platform Certification List (#225) * Added the platform test list json and a Readme about the file in a folder in the repo root * Applying Gemini's comments * Moved the platform cert files to the matter folder * Update code due to platform test file location (#227) * Updated code after platform test location file is placed in new location * [Platform-Certification] Platform Certification List (#225) * Added the platform test list json and a Readme about the file in a folder in the repo root * Applying Gemini's comments * Moved the platform cert files to the matter folder * Fixed the right platform file path --------- Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> * Updated python_tests (#228) * Updated SDK SHA and python_tests_info.json for v2.13-beta4+summer2025 * Add POST test_run_executions/cli * Remove unused code * Code review --------- Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> * [FIX] Fix logic for platform tests selection (#230) * Fixed applicable test cases for platform test execution * Code formating * Fix the platform keys for PICS_PLAT_CERT and PICS_PLAT_CERT_DERIVED * Fixed mypy * Black fix * Updated version to v2.13-beta4.1+summer2025 * Minor changes * Fixed platform tests selection when no PICS were informed (#232) * Fixed platform tests selection when no PICS were informed * Balck and flake8 fixes * Minor code comment * [FIX] Make python script test name more flexible (#233) * Make python script test name more flexible * Add comment for the regex * Fix logix for platorm test selection (#234) * Revert "[FIX] Make python script test name more flexible (#233)" (#235) This reverts commit d1e207e64518ed9b962074a04b3318706be6074d. --------- Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> * [Camera] Update backend to allow python testing framework to invoke perform video stream verification (#215) * Adds support to run camera app yaml test cases using camera-controller Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * Apply formatter and fix action workflow failure Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * Adds a hook for the python test framework to invoke video verification prompt Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * Adds support for python test framework to invoke image verification prompt required for snap shot TCs Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * Fix PromptOptions to enable submit button when opting for FAIL Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * Apply formatter Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * Fix issues reported by Black, Mypy Signed-off-by: suyambu.rm <suyambu.rm@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * Update app/api/api_v1/sockets/web_sockets.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/yaml_tests/models/chip_test.py Co-authored-by: antonio-amjr <116589331+antonio-amjr@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/models/test_case.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/models/test_case.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/models/test_case.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/models/test_case.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Evaluate prompt response for errors Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> --------- Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> Signed-off-by: suyambu.rm <suyambu.rm@samsung.com> Co-authored-by: s-gatti <s.gatti@samsung.com> Co-authored-by: suyambu.rm <suyambu.rm@samsung.com> Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> Co-authored-by: antonio-amjr <116589331+antonio-amjr@users.noreply.github.com> * Fixed stress test interaction TC_COMMISSIONING_1_0 test case (#239) * Fixed stress test interaction TC_COMMISSIONING_1_0 test case * Code review * Fix typo * Updated cspell.json * [Camera] Handle video stream socket operations in SocketConnectionManager (#241) * Handle video stream socket operations in SocketConnectionManager Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * Update imports and fixes Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * review fixes Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> --------- Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> Co-authored-by: s-gatti <s.gatti@samsung.com> * Added support to PICS for /test_run_executions/cli endpoint (#236) * Changes for v2.13-beta4+summer2025 version (#224) * Changes for v2.13-beta4+summer2025 version * Updated path for platform-test.json file in cspell.json * Updated the affected sdk references (#226) * [Platform-Certification] Platform Certification List (#225) * Added the platform test list json and a Readme about the file in a folder in the repo root * Applying Gemini's comments * Moved the platform cert files to the matter folder * Update code due to platform test file location (#227) * Updated code after platform test location file is placed in new location * [Platform-Certification] Platform Certification List (#225) * Added the platform test list json and a Readme about the file in a folder in the repo root * Applying Gemini's comments * Moved the platform cert files to the matter folder * Fixed the right platform file path --------- Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> * Updated python_tests (#228) * Updated SDK SHA and python_tests_info.json for v2.13-beta4+summer2025 * New endpoint for CLI execution - Simplify the process (#229) * create /cli endpoint * Changes for v2.13-beta4+summer2025 version (#224) * Changes for v2.13-beta4+summer2025 version * Updated path for platform-test.json file in cspell.json * Updated the affected sdk references (#226) * [Platform-Certification] Platform Certification List (#225) * Added the platform test list json and a Readme about the file in a folder in the repo root * Applying Gemini's comments * Moved the platform cert files to the matter folder * Update code due to platform test file location (#227) * Updated code after platform test location file is placed in new location * [Platform-Certification] Platform Certification List (#225) * Added the platform test list json and a Readme about the file in a folder in the repo root * Applying Gemini's comments * Moved the platform cert files to the matter folder * Fixed the right platform file path --------- Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> * Updated python_tests (#228) * Updated SDK SHA and python_tests_info.json for v2.13-beta4+summer2025 * Add POST test_run_executions/cli * Remove unused code * Code review --------- Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> * [FIX] Fix logic for platform tests selection (#230) * Fixed applicable test cases for platform test execution * Code formating * Fix the platform keys for PICS_PLAT_CERT and PICS_PLAT_CERT_DERIVED * Fixed mypy * Black fix * Updated version to v2.13-beta4.1+summer2025 * Minor changes * Fixed platform tests selection when no PICS were informed (#232) * Fixed platform tests selection when no PICS were informed * Balck and flake8 fixes * Minor code comment * [FIX] Make python script test name more flexible (#233) * Make python script test name more flexible * Add comment for the regex * Fix logix for platorm test selection (#234) * Revert "[FIX] Make python script test name more flexible (#233)" (#235) This reverts commit d1e207e64518ed9b962074a04b3318706be6074d. * Added support to PICS for /test_run_executions/cli endpoint * Update app/api/api_v1/endpoints/test_run_executions.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update app/api/api_v1/endpoints/test_run_executions.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update app/api/api_v1/endpoints/test_run_executions.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update app/api/api_v1/endpoints/test_run_executions.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update app/api/api_v1/endpoints/test_run_executions.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Code review * Code review * back and flake8 --------- Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Optimize sideload process (#237) * Changes for v2.13-beta4+summer2025 version (#224) * Changes for v2.13-beta4+summer2025 version * Updated path for platform-test.json file in cspell.json * Updated the affected sdk references (#226) * [Platform-Certification] Platform Certification List (#225) * Added the platform test list json and a Readme about the file in a folder in the repo root * Applying Gemini's comments * Moved the platform cert files to the matter folder * Update code due to platform test file location (#227) * Updated code after platform test location file is placed in new location * [Platform-Certification] Platform Certification List (#225) * Added the platform test list json and a Readme about the file in a folder in the repo root * Applying Gemini's comments * Moved the platform cert files to the matter folder * Fixed the right platform file path --------- Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> * Updated python_tests (#228) * Updated SDK SHA and python_tests_info.json for v2.13-beta4+summer2025 * New endpoint for CLI execution - Simplify the process (#229) * create /cli endpoint * Changes for v2.13-beta4+summer2025 version (#224) * Changes for v2.13-beta4+summer2025 version * Updated path for platform-test.json file in cspell.json * Updated the affected sdk references (#226) * [Platform-Certification] Platform Certification List (#225) * Added the platform test list json and a Readme about the file in a folder in the repo root * Applying Gemini's comments * Moved the platform cert files to the matter folder * Update code due to platform test file location (#227) * Updated code after platform test location file is placed in new location * [Platform-Certification] Platform Certification List (#225) * Added the platform test list json and a Readme about the file in a folder in the repo root * Applying Gemini's comments * Moved the platform cert files to the matter folder * Fixed the right platform file path --------- Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> * Updated python_tests (#228) * Updated SDK SHA and python_tests_info.json for v2.13-beta4+summer2025 * Add POST test_run_executions/cli * Remove unused code * Code review --------- Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> * [FIX] Fix logic for platform tests selection (#230) * Fixed applicable test cases for platform test execution * Code formating * Fix the platform keys for PICS_PLAT_CERT and PICS_PLAT_CERT_DERIVED * Fixed mypy * Black fix * Updated version to v2.13-beta4.1+summer2025 * Minor changes * Fixed platform tests selection when no PICS were informed (#232) * Fixed platform tests selection when no PICS were informed * Balck and flake8 fixes * Minor code comment * [FIX] Make python script test name more flexible (#233) * Make python script test name more flexible * Add comment for the regex * Fix logix for platorm test selection (#234) * Revert "[FIX] Make python script test name more flexible (#233)" (#235) This reverts commit d1e207e64518ed9b962074a04b3318706be6074d. * Optimize Ssideload process * Code review * Code review * Code review - MYPY --------- Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> * [Fix] - Fix import test harness client (#243) * Fixed test_harness_client.py import * Undo set manual_execution value to 1 * Changes for V2.14 beta1+fall2025 version (#244) * Updated SDK SHA and version for v2.14-beta1+fall2025 * Updated python_tests_info.json file * Handle errors for groups commands * Update test_collections/matter/sdk_tests/support/python_testing/list_python_tests_classes.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Code review --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Updating with v2.14-beta1.1+winter2025 release (#247) * Updating with v2.14-beta1.1+winter2025 release * Updating again SDK SHA and python tests info json file * Updated unit test to not modify .version_information file (#253) * Updated unit test to not modify .version_information file * Isort and black * Code review - gemini * Code review * Added support to project_id in test_run_executions POST /cli (#252) * Added support to project_id in test_run_executions POST /cli * black and isort * Update app/api/api_v1/endpoints/test_run_executions.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Flake8 * Fixed unit tests * black * Update app/tests/api/api_v1/test_test_run_executions.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Code review --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Fix POST testrun_executions/cli not using config when project id is informed (#254) * RUn POST testrun_executions/cli not using config when project id is informed * mypy, black, flake8 * flake8 * black * Fixes raised by Gemini in PR#250 (#255) * Minor changes raised by gamini in PR#250 * Code review - Gemini * [FIX] Updated TH after SDK refactoring (#258) * Updated TH after SDK refactoring * Update test_collections/matter/sdk_tests/scripts/fetch_sdk_tests_and_runner.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Version v2.14-beta2+fall2025 (#259) * Version v2.14-beta2+fall2025 * Updated cspell * [Camera] Push AV validation prompt support (#251) * Adds push av validation prompt Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * Apply formatter Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * Address review comments Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> --------- Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> Co-authored-by: s-gatti <s.gatti@samsung.com> * [Camera] Add signaling endpoints for WebRTC (#256) * Add signaling endpoints for WebRTC Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * linting fixes Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * fix mypy issue Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * Log error messages Signed-off-by: Charles Kim <chulspro.kim@samsung.com> --------- Signed-off-by: Charles Kim <chulspro.kim@samsung.com> Co-authored-by: abhishek.h <abhishek.h@samsung.com> * [Camera] Adds pop up for two way talk verification request (#257) * Adds pop up for two way talk verification request Signed-off-by: Charles Kim <chulspro.kim@samsung.com> * Address review comments Signed-off-by: Charles Kim <chulspro.kim@samsung.com> --------- Signed-off-by: Charles Kim <chulspro.kim@samsung.com> Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * black * Updated fetch_sdk_tests_and_runner script to install chipyaml wheel (#260) * Updated fetch_sdk_tests_and_runner script to install chipyaml wheel * updated cspell.json file * Update test_collections/matter/sdk_tests/scripts/fetch_sdk_tests_and_runner.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Code review - gemini * Update test_collections/matter/sdk_tests/scripts/fetch_sdk_tests_and_runner.sh Co-authored-by: antonio-amjr <116589331+antonio-amjr@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: antonio-amjr <116589331+antonio-amjr@users.noreply.github.com> * [Fix] Fix missing python script in TH UI (#261) * Updated fetch_sdk_tests_and_runner script to install chipyaml wheel * updated cspell.json file * Update test_collections/matter/sdk_tests/scripts/fetch_sdk_tests_and_runner.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Code review - gemini * Fix logic for Python scripts be listed as test script * Added python_tests_info.json file * Code review - gemini * added pyproject to ignore words in cspell * Mypy * Mypy --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * v2.14-beta2.1+fall2025 version (#262) * v2.14-beta2.1+fall2025 version * Updated .version_information * Restore msg argument in SDKPythonTestResultShowTwoWayTalkPrompt (#263) Signed-off-by: s-gatti <s.gatti@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com> Co-authored-by: s-gatti <s.gatti@samsung.com> * [Enhancement] Dynamic generate python_test_info.json file (#264) * Dynamic generate python_test_info.json file * Empty python_test_info file * Add python_test_info.json file to .gitignore file * Unit test fix * flake8 * Fix unit test * Removed python_tests_info.json file (#265) * [Fix] Update filename pattern validation for python test files (#266) * Update logic to list python scripts * Code review * Code review * Updated code comment * Updated unit test * Updated unit test * Updated unit tests * flake8 * Updated unit tests * Updated code comment * black * Updated argument handling in test_harness_client (#270) * Updated argument handling in test_harness_client * Update test_collections/matter/sdk_tests/support/python_testing/models/rpc_client/test_harness_client.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Code review - gemini * Code review * Mypy * Update code comment * Update test_collections/matter/sdk_tests/support/python_testing/models/rpc_client/test_harness_client.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/models/rpc_client/test_harness_client.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> * Fixing sdk container arguments by always passing thread and wifi info (#268) * v2.14-beta3+fall2025 version * Updated SDK version to 966e378dab819d3abd4a59b468dc61d80b8b4b41 * Updated SDK SHA to f902839abf1de0d17956de34889b6ad997e2c5e4 * Fix error handling in Python test list generation to prevent KeyError (#271) * Improve list_python_tests_classes.py file * Code formating * Update test_collections/matter/sdk_tests/support/python_testing/list_python_tests_classes.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/list_python_tests_classes.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * mypy * cspell updated * Remove unnecessary comments --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Fix python script listing (#272) * Fix python script listing * Added feature to files that should be included despite regex * Code review * Code review * Refactoring method to read ignore and include file * Updated SDK_SHA after some scripts fixes * Implement real-time log synchronization for Python test steps (#267) * Allow realtime logging for python scripts * Some performance improvements * Code review * Code review - mypu * Code review --------- Co-authored-by: Romulo Quidute Filho <romuloquidute@gmail.com> * Add sdk docker image sha info (#273) * Added sdk_docker_tag info * Print whole SDK_DOCKER_TAG instead of only 7 digits * Unit test refactoring * Updated type hint * Updared cspell.json * Disable Polkit in chip-cert-bins (#269) * Polkit should be disabled when PCSC reader is used in a Docker container. Change-Id: I6889fd99972f19cbbfc80623cf9a6bb29155dda2 * Update test_collections/matter/sdk_tests/support/python_testing/models/test_suite.py Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Changes following code review. Change-Id: Ic41e6d205440714dd526d1aeaad52c6ce1f8cfbe * Change following code review Change-Id: I159b72d1a8fd9adadf74d8b4692960c9dbbc2cdf * Change from Romulo Change-Id: Idfc456d037ac8ff4296c83193400fc4bc8f14dbb --------- Co-authored-by: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> * Feature/763 use argparse test harness client (#274) * Improve test_harness_client by using argparse * Code review * Added commissioning logs (#275) * Added commissioning logs * Update test_collections/matter/sdk_tests/support/python_testing/models/utils.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/models/utils.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Flake8 --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * [FEATURE] Add equivalent shell command logs when using docker api (#276) * Add equivalent shell command when using docker api * Update app/container_manager/docker_shell_commands.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update app/container_manager/docker_shell_commands.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update app/container_manager/docker_shell_commands.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/sdk_container.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update app/container_manager/docker_shell_commands.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update app/container_manager/docker_shell_commands.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Code review * Flake8 * Code review * Code review * Code review --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * [Fix] Moved Shared Constants To New File (#277) * Created shared constants script and added two Enums to the file * Adding MessageKeysEnum as shared, removed original and changing all related imports * Adding TestStateEnum and changing all relevant imports * Exchanging for a app relative import in the models' init file * Updating Copyright's Date Year * Reverting python_tests SHA since it's not ready yet * Updating Matter test scripts SHA * [Feature] Improve Python Testing Initialization (#278) * Creating test manager and updating code logic to improve Python Testing initialization * Updating file's year and removing Optional import from test manager * Removing code duplication * Adding forward reference type hint to Python Testing init * Removing unnecessary imports and changing a too long line error from the test manager * Removing unnecessary comment * Get changes from v2.14-develop into v2.15-develop (#280) * Updated SDK version to 68e03c17300eb42c0d3946130aa2a8f7a2a06632 for v1.5 final release * Updated SDK_SHA to ca9d1118e097fe947b2aec1ba84f265d6cf2447e * Update .version_information Co-authored-by: antonio-amjr <116589331+antonio-amjr@users.noreply.github.com> --------- Co-authored-by: antonio-amjr <116589331+antonio-amjr@users.noreply.github.com> * Feature/785 make log synchronization configurable (#279) * Updated SDK version to 68e03c17300eb42c0d3946130aa2a8f7a2a06632 for v1.5 final release * Updated SDK_SHA to ca9d1118e097fe947b2aec1ba84f265d6cf2447e * Implement code to make log synchronization configurable * Run black * Code review * Updated python_tests submodule * Code review * Updating SDK SHA for the v2.15-beta1+winter2025 release (Matter 1.6 TE1) * [FIX] Custom Suite And Custom TC Naming (#282) * Fixing Custom Name for presentation and adding symbolic links for easy access to the custom folders * Gemini's suggestion: Improving readability for the custom suffix variable processing logic * Fixing Backend's API for the CLI Test Run Execution (#283) * Fixing Backend's API for the CLI Test Run Execution * Gemini suggestions: Updating logic for efficiency Also avoiding modifying external variable. * Solve flake8 error in singleton.py file * Fix permission denied errors in update-paa-certs.sh by force recreating directories (#285) * Fix update-paa-certs.sh permission error * Code review * [Feature] Adding chip-server information API (#284) * Adding chip-server information API * Updating endpoint to use Chip Server Info schema * Add support to sort the test run execution list and retrieve all records without pagination (#286) * Add sort_order to GET test_run_execution * Add support to sort results and retrive all records from test_run_execution * Update app/tests/crud/test_test_run_execution.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update app/crud/crud_test_run_execution.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update app/crud/crud_test_run_execution.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Improved logic to load json file, while launching. This avoids unpredicable unit tests failing due to race condition * Flake8 * Code review - Mock read python test JSON file * Code review - organize imports and remove useless code * Code review - flake8 * Code review - flake8 * Code review - fix unit test * Code revier * Code review --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * [Feature] Updating CHIP Server Info Endpoint to Include Manual Pairing Code (#287) * Updating CHIP Server Info endpoint to include Manual Pairing Code * Gemini's Suggestion: Improving logic * Adding break to leave out of the for loop as soon as possible * Skip load custom tests step if no custom tests were found (#288) * Skip load custom tests step if no custom tests were found * Update test_collections/matter/sdk_tests/support/python_testing/test_manager.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * [Feature] Adding Support to CLI's Double-Dash Extra Arguments Feature (#289) * Adding support to the CLI's double dash extra arguments feature * Improving logic and fixing comment * Updating endpoint's comments Adding note for the scenario where both configs are provided * Implemented configuration for enabling/disabling container information logging (#290) * Implemented configuration for enabling/disabling container information logging * Code review - Gemini * Fixes for Python tests being loaded twice during Test Harness startup (#291) * Fixes for Python tests being loaded twice during Test Harness startup * Code review * Updated backend version v2.15-beta2+spring2026 (#292) * Updated SDK SHA to 9b1078da4307f98d362a0b44625a94d649bc1e77 for v2.14.1-beta1+winter2026 version * Version v2.14.1-beta2+winter2026 * [Feature] TH to support thread commissioning (#295) * Initial code for thread support * Code formating and isort * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Code review - gemini-code-assistant * Code review - gemini-code-assistant * Code review - gemini-code-assistant * Code review flake8 - gemini-code-assistant * Code review mypy --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Adding nfc-wifi to the backend rebased to V2.15-develop (#294) * Adding nfc-wifi to the backend * Keeping Flake8 happy * Making another tool happy * improvents according to Gemini * refactor updates throughout necessary files * reverting change in test_suite.py * updates according to Gemini * updates to keep tools happy * tooling update * Version v2.15-beta2.1+spring2026 * Fixed imports in test_harness_client.py file (#297) * Updated all references from Thread to Thread_meshcop (#299) * Updated all references from Thread to Thread_meshcop * Code formating * Updated SDK_SHA * [Fix] Argument Generation When Using NFC Commissioning (#298) * Fixing argument generation when using NFC commissioning Dut config shouldn't pass discrminator, passcode, manual code or qr-code when using NFC pairing mode * Fixing unit tests * Improving logic and exchangin data structure from list to set * Fix the Python test script parser to correctly identify base test classes imported from additional Matter SDK modules. (#300) * Fix python script parser * Code review - gemini * Code review - adjust endswith for TestBase in python script parser * Code review - mypy fix * Version v2.15-beta2.2+spring2026 * Fix/888 include missing tests (#302) * Improved logic to load python test scripts * Added test_python_test_initialization.py unit test file * Update copyright year * Code review - mypy/flake8 * Code review - mypy/flake8 * Code review - mypy/flake8 * Code review - flake8 * Update test_collections/matter/sdk_tests/support/python_testing/list_python_tests_classes.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update test_collections/matter/sdk_tests/support/python_testing/list_python_tests_classes.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Code review - gemini code assist * Code review --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Fix json-arg not working (#304) * Fix json-arg not working * Code review- Gemini Code assist * Code review- Gemini Code assist * Code review- Gemini Code assist * Added more unit test in order to covert more scenarios * Release Matter 1.6 SVE (v2.15-beta3+spring2026) * Release Matter 1.6 SVE version 2 (v2.15-beta3.1+spring2026) * [FIX] Updating Test Run Executions To Handle temporary PICS (#305) * Updating infrastructure to handle temporary PICS for Test Run Executions * Fixing test_run_executions.py docstring * Improving return expression in the test_run.py file * Fixing the related unit tests * Removing unnecessary import * Fix custom sideloaded test scripts not appearing in the test list when their base class is defined in support_modules (#306) * Consider using extra dir(SDK files) when discovering custom test cases * Code review - Google code assist * Fix black * Remove commissioning prompt from no commissioning tests (#307) * Remove commissioning prompt from no commissioning suite * Fix mypy * Code review * Make pcscd --disable-polkit started unconditionally (#309) * Fix TC_DD_3_24 hang on user prompt timeout in _show_prompt_request (#308) * Fix TC_DD_3_24 hang on user prompt timeout in _show_prompt_request. When wait_for_user_input times out, response_str is None so nothing was sent to the test socket, leaving the SDK process blocked on input() forever. * Update test_collections/matter/sdk_tests/support/python_testing/models/test_case.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Code review --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Fix ImportError for CommissionDeviceTest in test_harness_client (#312) CommissionDeviceTest has been moved from matter.testing.commissioning to matter.testing.CommissioningPreTest in the Matter SDK. The old path no longer exports this symbol, which causes --get-test-info to fail and the Python test list to be empty in the UI. Fixes #981 * Annotate grouped log download for api generation (#313) * v2.15+spring2026 version (#315) * Fix ModuleNotFoundError - matter.testing.CommissioningPreTest (#316) * [Fix] Prefer operational_dataset_hex over live OTBR dataset in ThreadAutoConfig (#324) * Fix cspell issues (#325) * Fix cspell issues * Code review * Fix flake8 linting issues (#326) * Remove unused Performance Tests feature (#328) - Delete test_collections/matter/sdk_tests/support/performance_tests/ folder (test collection, models, scripts — 13 files) - Remove sdk_performance_collection import from test_collections/matter/__init__.py - Remove STRESS_TEST_COLLECTION import and pop() call from pics_applicable_test_cases.py - Remove create_summary_report import and POST /{id}/performance_summary endpoint from app/api/api_v1/endpoints/test_run_executions.py - Remove Performance Test Suite special-case branches and TestStep import from app/test_engine/test_script_manager.py - Remove stress test script path constants and volume mounts from sdk_container.py * Release v2.15.1-beta1+summer2026 (#339) Bump version and SDK pin (SDK_DOCKER_TAG/SDK_SHA) to df8bd0308caa0680e2a78cda724a959e5b385205. * Fix: remove incompatible nodejs/npm/cspell install from Dockerfile (#340) * Remove nodejs/npm/cspell install from Dockerfile npm@latest now requires node >=22, incompatible with the node 20.x installed here, breaking the backend image build (npm error EBADENGINE). Spell checking already runs independently in CI via streetsidesoftware/cspell-action (.github/workflows/spell-check.yml) and scripts/lint.sh is only invoked by developers locally — neither needs node/npm/cspell baked into the runtime image. Fixes #1044 * Fix flake8 * Fix ImportError for CommissionDeviceTest at SDK df8bd030 At SDK_SHA df8bd0308caa0680e2a78cda724a959e5b385205 (v1.6.1-mve-branch), CommissionDeviceTest lives in matter.testing.CommissioningPreTest again, not matter.testing.commissioning (where it had been moved to prior to backend #316, for an older SDK pin). The SDK has since moved it back, breaking --get-test-info and all Python test commissioning with: ImportError: cannot import name 'CommissionDeviceTest' from 'matter.testing.commissioning' * Fix WebSocket disconnect during large manual log file uploads (#1062) (#343) * Fix WebSocket disconnect during large manual log file uploads Uploading a manual test log with hundreds of thousands of lines (e.g. TC-CADMIN-1.17) called logger.info() once per line. Each call triggered a broadcast over …
1 parent 65e8ca3 commit d7c2bb2

52 files changed

Lines changed: 1344 additions & 2193 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.version_information

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2.15+spring2026
1+
v2.15.1+summer2026

Dockerfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ RUN curl -sSL https://install.python-poetry.org | python3 - && \
6161
# Install Docker
6262
RUN curl -sSL https://get.docker.com/ | sh
6363

64-
# Install nodejs, npm and spell checker
65-
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
66-
RUN apt-get install -y nodejs
67-
RUN npm install -g npm@latest
68-
RUN npm install -g cspell@latest
69-
7064
# Allow installing dev dependencies to run tests
7165
# Copy poetry dependecy files and install dependencies
7266
# We copy install dependencies before copying all app source to reuse the dependency install step in docker.

app/api/api_v1/endpoints/test_run_executions.py

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@
1414
# limitations under the License.
1515
#
1616
import json
17-
import os
18-
from datetime import datetime
1917
from http import HTTPStatus
2018
from typing import Any
2119

22-
import requests
2320
from fastapi import APIRouter, BackgroundTasks, Depends, File, HTTPException, UploadFile
2421
from fastapi.encoders import jsonable_encoder
2522
from fastapi.responses import JSONResponse, StreamingResponse
@@ -45,10 +42,6 @@
4542
)
4643
from app.version import version_information
4744
from test_collections.matter.sdk_tests.support.chip.chip_server import ChipServer
48-
from test_collections.matter.sdk_tests.support.performance_tests.utils import (
49-
create_summary_report,
50-
)
51-
from test_collections.matter.test_environment_config import TestEnvironmentConfigMatter
5245

5346
router = APIRouter()
5447

@@ -655,87 +648,3 @@ def import_test_run_execution(
655648
status_code=HTTPStatus.UNPROCESSABLE_ENTITY,
656649
detail=str(error),
657650
)
658-
659-
660-
date_pattern_out_file = "%Y_%m_%d_%H_%M_%S"
661-
662-
663-
@router.post("/{id}/performance_summary")
664-
def generate_summary_log(
665-
*,
666-
db: Session = Depends(get_db),
667-
id: int,
668-
project_id: int,
669-
) -> JSONResponse:
670-
"""
671-
Imports a test run execution to the the given project_id.
672-
"""
673-
674-
project = crud.project.get(db=db, id=project_id)
675-
676-
if not project:
677-
raise HTTPException(
678-
status_code=HTTPStatus.NOT_FOUND, detail="Project not found"
679-
)
680-
681-
project_config = TestEnvironmentConfigMatter(**project.config)
682-
matter_qa_url = None
683-
LOGS_FOLDER = "/test_collections/logs"
684-
HOST_BACKEND = os.getenv("BACKEND_FILEPATH_ON_HOST") or ""
685-
HOST_OUT_FOLDER = HOST_BACKEND + LOGS_FOLDER
686-
687-
if (
688-
project_config.test_parameters
689-
and "matter_qa_url" in project_config.test_parameters
690-
):
691-
matter_qa_url = project_config.test_parameters["matter_qa_url"]
692-
else:
693-
raise HTTPException(
694-
status_code=HTTPStatus.UNPROCESSABLE_ENTITY,
695-
detail="matter_qa_url must be configured",
696-
)
697-
698-
page = requests.get(f"{matter_qa_url}/home")
699-
if page.status_code is not int(HTTPStatus.OK):
700-
raise HTTPException(
701-
status_code=page.status_code,
702-
detail=(
703-
"The LogDisplay server is not responding.\n"
704-
"Verify if the tool was installed, configured and initiated properly"
705-
),
706-
)
707-
708-
commissioning_method = project_config.dut_config.pairing_mode
709-
710-
test_run_execution = crud.test_run_execution.get(db=db, id=id)
711-
if not test_run_execution:
712-
raise HTTPException(
713-
status_code=HTTPStatus.NOT_FOUND, detail="Test Run Execution not found"
714-
)
715-
716-
log_lines_list = log_utils.convert_execution_log_to_list(
717-
log=test_run_execution.log, json_entries=False
718-
)
719-
720-
timestamp = ""
721-
if test_run_execution.started_at:
722-
timestamp = test_run_execution.started_at.strftime(date_pattern_out_file)
723-
else:
724-
timestamp = datetime.now().strftime(date_pattern_out_file)
725-
726-
tc_name, execution_time_folder = create_summary_report(
727-
timestamp, log_lines_list, commissioning_method
728-
)
729-
730-
target_dir = f"{HOST_OUT_FOLDER}/{execution_time_folder}/{tc_name}"
731-
url_report = f"{matter_qa_url}/home/displayLogFolder?dir_path={target_dir}"
732-
733-
summary_report: dict = {}
734-
summary_report["url"] = url_report
735-
736-
options: dict = {"media_type": "application/json"}
737-
738-
return JSONResponse(
739-
jsonable_encoder(summary_report),
740-
**options,
741-
)

app/container_manager/container_manager.py

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
docker_kill_command,
3232
docker_rm_command,
3333
docker_run_command,
34+
docker_stop_command,
3435
)
3536
from app.core.config import settings
3637
from app.singleton import Singleton
@@ -55,13 +56,35 @@ async def create_container(
5556

5657
return container
5758

58-
def destroy(self, container: Container) -> None:
59+
def destroy(self, container: Container, graceful: bool = False) -> None:
60+
"""Stop and remove a container.
61+
62+
By default this kills the container immediately (existing behavior, used by
63+
most callers that don't need the process inside to shut down cleanly).
64+
Pass `graceful=True` to try a normal stop (SIGTERM, falling back to SIGKILL
65+
after Docker's stop timeout) first, so the process inside has a chance to
66+
release any host resources it holds (e.g. a serial device) before removal.
67+
"""
5968
if self.is_running(container):
60-
# Log equivalent shell command for kill
61-
if settings.ENABLE_CONTAINER_LOGS:
62-
shell_cmd = docker_kill_command(container.name)
63-
logger.info(f"{SHELL_CMD_LOG_PREFIX}{shell_cmd}")
64-
container.kill()
69+
if graceful:
70+
if settings.ENABLE_CONTAINER_LOGS:
71+
shell_cmd = docker_stop_command(container.name)
72+
logger.info(f"{SHELL_CMD_LOG_PREFIX}{shell_cmd}")
73+
try:
74+
container.stop()
75+
except docker.errors.APIError as error:
76+
logger.warning(
77+
f"Graceful stop failed for container '{container.name}', "
78+
f"falling back to kill: {error}"
79+
)
80+
graceful = False
81+
82+
if not graceful:
83+
# Log equivalent shell command for kill
84+
if settings.ENABLE_CONTAINER_LOGS:
85+
shell_cmd = docker_kill_command(container.name)
86+
logger.info(f"{SHELL_CMD_LOG_PREFIX}{shell_cmd}")
87+
container.kill()
6588

6689
# Log equivalent shell command for remove
6790
if settings.ENABLE_CONTAINER_LOGS:
@@ -76,6 +99,30 @@ def get_container(self, id_or_name: str) -> Optional[Container]:
7699
logger.info(f"Did not find container by id or name: {id_or_name}.")
77100
return None
78101

102+
def remove_containers_for_image(self, docker_image_tag: str) -> None:
103+
"""Gracefully stop and remove any (running or stopped) container created
104+
from the given image.
105+
106+
Used to clear out containers that a previous, no-longer-tracked instance of
107+
this process left behind (e.g. after a crash or a failed start_device()
108+
call), which would otherwise hold onto host resources (like an RCP serial
109+
device) and block a new container from starting.
110+
111+
Note: this matches ANY container built from this image, host-wide, not just
112+
ones this process created — acceptable here because these OTBR images are
113+
dedicated to Test Harness use, but worth keeping in mind if this is ever
114+
reused for a shared/general-purpose image.
115+
"""
116+
stale_containers = self.__client.containers.list(
117+
all=True, filters={"ancestor": docker_image_tag}
118+
)
119+
for container in stale_containers:
120+
logger.warning(
121+
f"Removing leftover container '{container.name}' "
122+
f"({container.short_id}) for image {docker_image_tag}."
123+
)
124+
self.destroy(container, graceful=True)
125+
79126
def is_running(self, container: Container) -> bool:
80127
# NOTE: we need to get a new container reference to get updated status.
81128
if c := self.get_container(container.id):

app/container_manager/docker_shell_commands.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
Useful for debugging and understanding what Docker operations are being performed.
1919
"""
2020
from pathlib import Path
21-
from typing import Dict, List, Union
21+
from typing import Dict, List, Optional, Union
2222

2323
# Log message constants
2424
SHELL_CMD_LOG_PREFIX = "Docker API call equivalent shell command:\n"
@@ -42,18 +42,25 @@
4242
]
4343

4444

45-
def escape_shell_arg(arg: str) -> str:
45+
def escape_shell_arg(arg: Optional[str]) -> str:
4646
"""
4747
Escape shell argument if it contains spaces or special characters.
4848
4949
Uses single-quote wrapping for safety. Any single quotes in the argument
5050
are escaped using the pattern: ' becomes '\''
5151
(close quote, escaped quote, open quote).
5252
53+
Args:
54+
arg: The argument to escape. Docker container/image names can be None
55+
(e.g. a Container whose attrs have no "Name" key), so this is
56+
tolerated and rendered as an empty string rather than raising.
57+
5358
Returns:
5459
The argument wrapped in single quotes if it contains special characters,
5560
otherwise returns the argument unchanged.
5661
"""
62+
if arg is None:
63+
return ""
5764
if any(c in arg for c in SHELL_SPECIAL_CHARS):
5865
# Escape any single quotes: ' becomes '\''
5966
escaped_arg = arg.replace("'", "'\\''")
@@ -193,7 +200,7 @@ def docker_exec_command(
193200
return " ".join(cmd_parts)
194201

195202

196-
def docker_kill_command(container_name: str) -> str:
203+
def docker_kill_command(container_name: Optional[str]) -> str:
197204
"""
198205
Generate docker kill command.
199206
@@ -206,7 +213,20 @@ def docker_kill_command(container_name: str) -> str:
206213
return f"docker kill {escape_shell_arg(container_name)}"
207214

208215

209-
def docker_rm_command(container_name: str, force: bool = False) -> str:
216+
def docker_stop_command(container_name: Optional[str]) -> str:
217+
"""
218+
Generate docker stop command.
219+
220+
Args:
221+
container_name: Name or ID of the container
222+
223+
Returns:
224+
String representation of equivalent shell command
225+
"""
226+
return f"docker stop {escape_shell_arg(container_name)}"
227+
228+
229+
def docker_rm_command(container_name: Optional[str], force: bool = False) -> str:
210230
"""
211231
Generate docker rm command.
212232

app/main.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from app.api.api_v1.api import api_router
2121
from app.core.config import settings
2222
from app.test_engine.test_script_manager import test_script_manager
23+
from app.uvicorn_worker import WS_PING_TIMEOUT_S
2324

2425
app = FastAPI(
2526
title=settings.PROJECT_NAME, openapi_url=f"{settings.API_V1_STR}/openapi.json"
@@ -51,4 +52,9 @@ async def startup_event() -> None:
5152

5253

5354
if __name__ == "__main__":
54-
uvicorn.run(app, host="0.0.0.0", port=80, log_config=None)
55+
# ws_ping_timeout raised from uvicorn's 20s default: a large log flush can
56+
# keep the event loop busy long enough to miss the keepalive pong and get
57+
# the websocket dropped mid-broadcast (see app.uvicorn_worker).
58+
uvicorn.run(
59+
app, host="0.0.0.0", port=80, log_config=None, ws_ping_timeout=WS_PING_TIMEOUT_S
60+
)

app/pics_applicable_test_cases.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
TestCollectionDeclaration,
2626
)
2727
from app.test_engine.test_script_manager import test_script_manager
28-
from test_collections.matter.sdk_tests.support.performance_tests.utils import (
29-
STRESS_TEST_COLLECTION,
30-
)
3128

3229
PICS_PLAT_CERT = "PLAT.CERT"
3330
PICS_PLAT_CERT_DERIVED = "PLAT.CERT.TESTS.DONE"
@@ -168,9 +165,6 @@ def __applicable_test_cases(
168165
"""
169166
applicable_tests: set = set()
170167

171-
# The 'Performance Tests' Collection should not be considered for the PICS tests.
172-
test_collections.pop(STRESS_TEST_COLLECTION, None)
173-
174168
for test_collection in test_collections.values():
175169
# If mandatory is None, consider both mandatory and non-mandatory tests
176170
if mandatory is None or test_collection.mandatory == mandatory:

app/schemas/test_environment_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class ThreadAutoConfig(BaseModel):
3636
otbr_docker_image: Optional[str]
3737
ba_host: Optional[str] = None
3838
ba_port: Optional[int] = None
39+
operational_dataset_hex: Optional[str] = None
3940

4041

4142
class TestEnvironmentConfigError(Exception):

app/socket_connection_manager.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from fastapi.websockets import WebSocketDisconnect
2525
from loguru import logger
2626
from starlette.websockets import WebSocketState
27-
from websockets.exceptions import ConnectionClosedOK
27+
from websockets.exceptions import ConnectionClosedError, ConnectionClosedOK
2828

2929
from app.constants.shared_constants import MessageKeysEnum, MessageTypeEnum
3030
from app.constants.websockets_constants import (
@@ -129,17 +129,33 @@ async def broadcast(self, message: Union[str, dict, list]) -> None:
129129
# Convert dictionaries and lists to string using json
130130
if isinstance(message, dict) or isinstance(message, list):
131131
message = json.dumps(message, default=pydantic.json.pydantic_encoder)
132-
for connection in self.active_connections:
132+
# Iterate over a copy: disconnect() below mutates active_connections.
133+
for connection in list(self.active_connections):
133134
if connection.type == WebSocketTypeEnum.MAIN:
134135
websocket = connection.websocket
135136
try:
136137
await websocket.send_text(message)
137138
# Starlette raises websockets.exceptions.ConnectionClosedOK
138139
# when trying to send to a closed websocket.
139140
# https://github.com/encode/starlette/issues/759
140-
except ConnectionClosedOK:
141+
# ConnectionClosedError is raised on an abrupt drop (e.g. a
142+
# missed websocket keepalive pong) rather than a graceful
143+
# close - treat it the same way so a dead connection doesn't
144+
# keep being retried for the rest of the process's life.
145+
except (ConnectionClosedOK, ConnectionClosedError):
141146
if websocket.application_state != WebSocketState.DISCONNECTED:
142-
await websocket.close()
147+
try:
148+
await websocket.close()
149+
except Exception as close_error:
150+
# The transport can already be gone by this point
151+
# (that's the whole reason we're here) - closing
152+
# an already-dead socket failing is expected and
153+
# uninteresting, but must not prevent the
154+
# cleanup below from running.
155+
logger.debug(
156+
f"Error closing already-dead websocket: {close_error}"
157+
)
158+
self.disconnect(connection)
143159
logger.warning(
144160
f'Failed to send message: "{message}"'
145161
f' to websocket: "{websocket}", connection closed."'

0 commit comments

Comments
 (0)