Skip to content
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

Add block upload HIL test #584

Merged
merged 2 commits into from
Sep 11, 2024
Merged

Add block upload HIL test #584

merged 2 commits into from
Sep 11, 2024

Conversation

szczys
Copy link
Contributor

@szczys szczys commented Sep 10, 2024

This PR adds stream to the integration testing, with one task of testing block upload.

resolves https://github.com/golioth/firmware-issue-tracker/issues/640

Copy link

github-actions bot commented Sep 10, 2024

Visit the preview URL for this PR (updated for commit 1515ff8):

https://golioth-firmware-sdk-doxygen-dev--pr584-szczys-add-blo-zj37n2l0.web.app

(expires Wed, 18 Sep 2024 20:36:40 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a9993e61697a3983f3479e468bcb0b616f9a0578

.github/workflows/hil_test_esp-idf.yml Outdated Show resolved Hide resolved
.github/workflows/hil_test_linux.yml Outdated Show resolved Hide resolved
.github/workflows/hil_test_zephyr.yml Outdated Show resolved Hide resolved
@szczys szczys force-pushed the szczys/add-block-upload-hil-test branch 3 times, most recently from e5c89c9 to 8ba6012 Compare September 10, 2024 18:23
}
}

#define long_json \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be cleaner to store this in a text file and a header file generated by xxd -i, checking in both. Then the python script can directly calculate the hash of the txt file. This way, the code is easier to read (no super long array in the source), and there are fewer hardcoded things since both the C and python are generating their data from the same source (the txt file).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great suggestion, thanks. I've updated to use this approach.

Update the python Golioth tools repository to include device stream.get()
functionality needed for block upload HIL test.

This commit must be update with a tag number once a new release of the
tools repository is available.

Signed-off-by: Mike Szczys <mike@golioth.io>
@szczys szczys force-pushed the szczys/add-block-upload-hil-test branch 2 times, most recently from 082ea49 to 4089ad3 Compare September 11, 2024 15:27
@szczys szczys force-pushed the szczys/add-block-upload-hil-test branch from 4089ad3 to fd1d4d2 Compare September 11, 2024 15:46
@sam-golioth
Copy link
Contributor

ESP-IDF tests are failing to build

This test uploads a large JSON string using block upload. The included
pipeline must be enable in the firmware_ci project for proper data routing.
The hash of the json object is checked to confirm successful upload.

Signed-off-by: Mike Szczys <mike@golioth.io>
@szczys szczys force-pushed the szczys/add-block-upload-hil-test branch from fd1d4d2 to 1515ff8 Compare September 11, 2024 20:35
Copy link

Code Coverage

Type Coverage
lines 65.6% (1401 of 2137 lines)
functions 78.1% (139 of 178 functions)

Copy link
Contributor

@sam-golioth sam-golioth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @szczys !

@szczys szczys merged commit c2e28e1 into main Sep 11, 2024
39 of 44 checks passed
@szczys szczys deleted the szczys/add-block-upload-hil-test branch September 11, 2024 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants