-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Introduce Python-based freestanding tests #21567
Merged
woody-apple
merged 4 commits into
project-chip:master
from
tcarmelveilleux:python-mobly-test-samples2
Aug 3, 2022
Merged
Introduce Python-based freestanding tests #21567
woody-apple
merged 4 commits into
project-chip:master
from
tcarmelveilleux:python-mobly-test-samples2
Aug 3, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Testing with Cirque requires complex setup and it is not easy to add tests. - Testing with chip-repl is interactive only - We needed a way to test more complex test scenarios than possible with chip-tool which cannot deal with complex test cases including recomputed cryptographic values due to complex logic and data dependencies. This PR: - Uses existing Mobly test framework dependency to add capabilities to make freestanding tests (see `src/python_testing/hello_test.py`) - Adds a module that only depends on existing CHIP modules in the virtual environment to provide needed scaffolding for tests running, including being able to commission a device from the command line - Adds needed cryptographic dependencies to environment for upcoming tests - Adds an example test (`hello_test.py`) - Added support to Python ChipDeviceCtrl to do on-network commissioning (thanks @erjiaqing!) What will follow-up: - Better docs - More sample tests - A way to re-use credentials from chip-tool with Python (already WIP) Testing done: - Built a test for TC-DA-1.7 (not included here) and ran it successfully against an all-clusters-app - Unit tests still pass - Integration tests still pass
pullapprove
bot
requested review from
andy31415,
anush-apple,
arkq,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
emargolis,
erjiaqing,
franck-apple,
gjc13,
harsha-rajendran,
hawk248,
isiu-apple,
jelderton,
jepenven-silabs,
jmartinez-silabs,
jtung-apple,
kghost,
kpschoedel,
lazarkov,
LuDuda,
mlepage-google and
mrjerryjohns
August 3, 2022 02:54
woody-apple
approved these changes
Aug 3, 2022
PR #21567: Size comparison from 83fb7fd to 7909bc4 Increases (1 build for esp32)
Decreases (3 builds for bl602, telink)
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
arkq
approved these changes
Aug 3, 2022
isiu-apple
pushed a commit
to isiu-apple/connectedhomeip
that referenced
this pull request
Sep 16, 2022
* Introduce Python-based freestanding tests - Testing with Cirque requires complex setup and it is not easy to add tests. - Testing with chip-repl is interactive only - We needed a way to test more complex test scenarios than possible with chip-tool which cannot deal with complex test cases including recomputed cryptographic values due to complex logic and data dependencies. This PR: - Uses existing Mobly test framework dependency to add capabilities to make freestanding tests (see `src/python_testing/hello_test.py`) - Adds a module that only depends on existing CHIP modules in the virtual environment to provide needed scaffolding for tests running, including being able to commission a device from the command line - Adds needed cryptographic dependencies to environment for upcoming tests - Adds an example test (`hello_test.py`) - Added support to Python ChipDeviceCtrl to do on-network commissioning (thanks @erjiaqing!) What will follow-up: - Better docs - More sample tests - A way to re-use credentials from chip-tool with Python (already WIP) Testing done: - Built a test for TC-DA-1.7 (not included here) and ran it successfully against an all-clusters-app - Unit tests still pass - Integration tests still pass * Restyled by clang-format * Restyled by gn * Restyled by autopep8 Co-authored-by: Restyled.io <[email protected]>
agners
added a commit
to agners/connectedhomeip
that referenced
this pull request
May 16, 2023
PR project-chip#21567 introduced an unecessary dependency to pycrypto. From PyPI it seems that pycrypto is largely unmaintained, and I did not found a use in the Python bindings or in the Python test. Also drop the comment about cyryptography and ecdsa usage as the library is meanwhile used in the core CHIP Python libraries.
agners
added a commit
to agners/connectedhomeip
that referenced
this pull request
May 16, 2023
PR project-chip#21567 introduced an unnecessary dependency to pycrypto. From PyPI it seems that pycrypto is largely unmaintained, and I did not found a use in the Python bindings or in the Python test. Also drop the comment about cryptography and ecdsa usage as the library is meanwhile used in the core CHIP Python libraries.
agners
added a commit
to agners/connectedhomeip
that referenced
this pull request
May 17, 2023
PR project-chip#21567 introduced an unnecessary dependency to pycrypto. From PyPI it seems that pycrypto is largely unmaintained, and I did not found a use in the Python bindings or in the Python test. Also drop the comment about cryptography and ecdsa usage as the library is meanwhile used in the core CHIP Python libraries.
andy31415
pushed a commit
that referenced
this pull request
May 18, 2023
PR #21567 introduced an unnecessary dependency to pycrypto. From PyPI it seems that pycrypto is largely unmaintained, and I did not found a use in the Python bindings or in the Python test. Also drop the comment about cryptography and ecdsa usage as the library is meanwhile used in the core CHIP Python libraries.
agners
added a commit
to agners/connectedhomeip
that referenced
this pull request
May 22, 2023
PR project-chip#21567 added mobly as a default dependency of the Python Core CHIP library. The mobly package is only used by the Python testing framework in `src/python_testing/`. Allow to install extra dependency via `script/build_python.sh` flag and install them only when needed.
agners
added a commit
to agners/connectedhomeip
that referenced
this pull request
May 23, 2023
PR project-chip#21567 added mobly as a default dependency of the Python Core CHIP library. The mobly package is only used by the Python testing framework in `src/python_testing/`. Allow to install extra dependency via `script/build_python.sh` flag and install them only when needed.
agners
added a commit
to agners/connectedhomeip
that referenced
this pull request
May 25, 2023
PR project-chip#21567 added mobly as a default dependency of the Python Core CHIP library. The mobly package is only used by the Python testing framework in `src/python_testing/`. Allow to install extra dependency via `script/build_python.sh` flag and install them only when needed.
agners
added a commit
to agners/connectedhomeip
that referenced
this pull request
May 26, 2023
PR project-chip#21567 added mobly as a default dependency of the Python Core CHIP library. The mobly package is only used by the Python testing framework in `src/python_testing/`. Allow to install extra dependency via `script/build_python.sh` flag and install them only when needed.
bzbarsky-apple
pushed a commit
that referenced
this pull request
May 26, 2023
* [python] Remove dependency only used in testing PR #21567 added mobly as a default dependency of the Python Core CHIP library. The mobly package is only used by the Python testing framework in `src/python_testing/`. Allow to install extra dependency via `script/build_python.sh` flag and install them only when needed. * [python] remove now unnecessary dependency mobly * Apply restyle changes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
tests.
with chip-tool which cannot deal with complex test cases including recomputed
cryptographic values due to complex logic and data dependencies.
Change overview
make freestanding tests (see
src/python_testing/hello_test.py
)environment to provide needed scaffolding for tests running, including
being able to commission a device from the command line
hello_test.py
)(thanks @erjiaqing!)
What will follow-up:
Testing
an all-clusters-app