-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Move CommissionDeviceTest class to commissioning.py #39478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move CommissionDeviceTest class to commissioning.py #39478
Conversation
…. Added class global_stash to have stashed attirbutes outside matter_testing. Updated runner imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request refactors the CommissionDeviceTest
class and related utilities into commissioning.py
, addressing circular dependency issues. The global_stash.py
module is introduced to handle Mobly's limitations with ctypes
objects. The changes are well-structured. The suggestions focus on improving type hinting and avoiding shadowing built-in names.
src/python_testing/matter_testing_infrastructure/chip/testing/commissioning.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/global_stash.py
Outdated
Show resolved
Hide resolved
PR #39478: Size comparison from 55d3763 to a96e714 Full report (3 builds for cc32xx, stm32)
|
PR #39478: Size comparison from c1d1dea to 0bc005b Increases above 0.2%:
Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
src/python_testing/matter_testing_infrastructure/chip/testing/commissioning.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
PR #39478: Size comparison from be1cfb1 to 348fc0d Full report (3 builds for cc32xx, stm32)
|
…ad_info for get_setup_payload_info_config at commissioning.py
PR #39478: Size comparison from be1cfb1 to cbcf789 Full report (11 builds for cc13x4_26x4, cc32xx, qpg, stm32, tizen)
|
PR #39478: Size comparison from be1cfb1 to 1ddeb96 Increases above 0.2%:
Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Summary
This PR contains the work to move the python class CommissioningDeviceTest from
matter_testing.py
tocommissioning.py
. This class works as a mobly TestCase class to commission the device if is needed, this class has a test in the methodtest_run_commissioning
to commission the device under test.Actions taken
get_setup_payload_info
to commissioning.py to avoid circular imports.Related issues
##Fixes: project-chip/matter-test-scripts#589
Testing
In order to test the changes I run a few tests using the Linux apps and the ESP32 M5 Stack to verify on-network commissioning works and device commissioning.
Build the linux application and run the one of the test using commissioning on-network
Flash the device with the LIGTHING_APP
Run the script and commissioning should be done properly.