feat(esp_delta_ota): Added pytest for the delta OTA example#609
Open
hrushikesh430 wants to merge 6 commits intoespressif:masterfrom
Open
feat(esp_delta_ota): Added pytest for the delta OTA example#609hrushikesh430 wants to merge 6 commits intoespressif:masterfrom
hrushikesh430 wants to merge 6 commits intoespressif:masterfrom
Conversation
d5697af to
58d4719
Compare
58d4719 to
3cc2130
Compare
8a2e671 to
a87ade5
Compare
6021f5b to
823b8ba
Compare
0a4ec06 to
23e674c
Compare
23e674c to
1290fca
Compare
Tested both firmware as well as tool in same pytest.
1290fca to
9e58b08
Compare
9e58b08 to
e48c135
Compare
- Unable to connect the python server through device, as the application runs on the device and pytest runs in the container.
e48c135 to
2764f8b
Compare
Unable to take the dut.app.partition_table, need to set the IDF_PATH
Collaborator
Author
|
@mahavirj PTAL. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds CI-oriented pytest coverage for the esp_delta_ota/examples/https_delta_ota example by introducing a local HTTPS server mode on-device, a partition to hold the generated patch, and build/test manifest rules to enable the app for ESP32 CI runs.
Changes:
- Added a pytest-based delta OTA flow that generates a patch, writes it to a dedicated
patch_datapartition, and triggers OTA via a local HTTPS server on the DUT. - Added CI-test-only local HTTPS server implementation and Kconfig/CMake integration to embed server certs/keys.
- Updated partition table and build-app rules to support/enable CI testing for ESP32.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| esp_delta_ota/examples/https_delta_ota/tools/requirements.txt | Adds esptool dependency for tooling used by pytest/patch generation. |
| esp_delta_ota/examples/https_delta_ota/sdkconfig.ci | CI config enabling stdin URL flow, CI test mode, and HTTPS server features. |
| esp_delta_ota/examples/https_delta_ota/pytest_https_delta_ota.py | New pytest test that generates/writes patch and drives OTA via stdin + local server. |
| esp_delta_ota/examples/https_delta_ota/partitions.csv | Fixes explicit offsets and adds patch_data partition for CI patch serving. |
| esp_delta_ota/examples/https_delta_ota/main/tests/test_local_server_ota.h | Declares CI-test server + stdin parsing helpers. |
| esp_delta_ota/examples/https_delta_ota/main/tests/test_local_server_ota.c | Implements local HTTPS server + stdin parsing to set patch size/url. |
| esp_delta_ota/examples/https_delta_ota/main/tests/hello_world_esp32.bin | Adds prebuilt target binary used as “new firmware” for delta patch generation. |
| esp_delta_ota/examples/https_delta_ota/main/tests/certs/servercert.pem | Adds embedded server certificate for DUT local HTTPS server (CI mode). |
| esp_delta_ota/examples/https_delta_ota/main/tests/certs/prvtkey.pem | Adds embedded private key for DUT local HTTPS server (CI mode). |
| esp_delta_ota/examples/https_delta_ota/main/main.c | Adds stdin URL mode and CI-test local server startup; switches embedded cert symbol names. |
| esp_delta_ota/examples/https_delta_ota/main/Kconfig.projbuild | Adds CI-test enable flag and derived “URL from stdin” config. |
| esp_delta_ota/examples/https_delta_ota/main/CMakeLists.txt | Conditionally includes CI server source and embeds TLS assets. |
| esp_delta_ota/examples/https_delta_ota/CMakeLists.txt | Updates CMake minimum version and includes esp_eth component. |
| esp_delta_ota/.build-test-rules.yml | New build/test enablement rules for esp_delta_ota apps (ESP32 only). |
| .idf_build_apps.toml | Registers esp_delta_ota/.build-test-rules.yml manifest in the root build-apps config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
esp_delta_ota/examples/https_delta_ota/pytest_https_delta_ota.py
Outdated
Show resolved
Hide resolved
esp_delta_ota/examples/https_delta_ota/main/tests/test_local_server_ota.c
Outdated
Show resolved
Hide resolved
esp_delta_ota/examples/https_delta_ota/main/tests/test_local_server_ota.c
Show resolved
Hide resolved
esp_delta_ota/examples/https_delta_ota/main/tests/test_local_server_ota.h
Outdated
Show resolved
Hide resolved
esp_delta_ota/examples/https_delta_ota/pytest_https_delta_ota.py
Outdated
Show resolved
Hide resolved
5b27326 to
888c5cc
Compare
Collaborator
Author
|
@mahavirj PTAL. |
This file contains hidden or 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
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.
Description