Skip to content

tests: Add test for DFU upload an image#635

Merged
nvlsianpu merged 1 commit intonrfconnect:mainfrom
fundakol:tests/bm-installer-upload-too-large-app
Feb 10, 2026
Merged

tests: Add test for DFU upload an image#635
nvlsianpu merged 1 commit intonrfconnect:mainfrom
fundakol:tests/bm-installer-upload-too-large-app

Conversation

@fundakol
Copy link
Copy Markdown
Contributor

@fundakol fundakol commented Feb 3, 2026

Added test for uploading too large application image.

@fundakol fundakol requested a review from a team as a code owner February 3, 2026 10:38
@github-actions github-actions Bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Feb 3, 2026
@NordicBuilder NordicBuilder requested a review from a team February 3, 2026 10:38
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

You can find the documentation preview for this PR here.

@fundakol fundakol force-pushed the tests/bm-installer-upload-too-large-app branch from f097e33 to 5089f0a Compare February 3, 2026 11:25
Copy link
Copy Markdown

@jumi-nordic jumi-nordic left a comment

Choose a reason for hiding this comment

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

LGTM with minor fixes needed:

  • Typos in docstrings
  • var type
  • temp files cleanup

Comment thread scripts/pytest_plugins/adapters/common.py
Comment thread tests/subsys/bootloader/upgrade/pytest/test_dfu.py Outdated
)

assert expand_hex_file(str(tmp_hex_path), str(output_hex), partition_size, extra_size), (
f"Cannot expand the hex file: {tmp_hex_path}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The test creates temporary files but doesn't clean them up. Consider adding cleanup logic

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Temporary files are managed by pytest. They are not deleted at the end of session, but pytest keeps only 3 last versions and deletes the oldest one when runs a new session. It helps with debugging when you need to check a temporary file after run. Also as those files are created in /tmp folder there will be deleted after restart of PC or a docker.

Copy link
Copy Markdown
Contributor

@eivindj-nordic eivindj-nordic left a comment

Choose a reason for hiding this comment

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

Left some nits.

Comment thread scripts/pytest_plugins/adapters/common.py Outdated
Comment thread scripts/pytest_plugins/adapters/common.py Outdated
Comment thread scripts/pytest_plugins/adapters/common.py Outdated
Comment thread scripts/pytest_plugins/utils/expand_firmware.py Outdated
@fundakol fundakol force-pushed the tests/bm-installer-upload-too-large-app branch from 5089f0a to d255390 Compare February 3, 2026 15:52
Added test for uploading too large application image.

Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
@fundakol fundakol force-pushed the tests/bm-installer-upload-too-large-app branch from d255390 to 1c53d60 Compare February 4, 2026 07:48
@nvlsianpu nvlsianpu merged commit a2c4437 into nrfconnect:main Feb 10, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants