-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
tests: net: lib: nrf_cloud: add fota_common tests #11734
Conversation
7e85a88
to
1b61a48
Compare
Test specificationCI/Jenkins/NRF
CI/Jenkins/integration
Detailed information of selected test modules Note: This message is automatically posted and updated by the CI |
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.
Stopping review here since I suspect with some added comments reviewing will go faster
1ba8bbf
to
ad6a3eb
Compare
- CONFIG_MCUBOOT_IMG_MANAGER=y | ||
- CONFIG_BOOTLOADER_MCUBOOT=y | ||
- CONFIG_IMG_MANAGER=y | ||
- CONFIG_STREAM_FLASH_ERASE=y | ||
- CONFIG_NRF_CLOUD_FOTA_FULL_MODEM_UPDATE=y |
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.
- CONFIG_MCUBOOT_IMG_MANAGER=y | |
- CONFIG_BOOTLOADER_MCUBOOT=y | |
- CONFIG_IMG_MANAGER=y | |
- CONFIG_STREAM_FLASH_ERASE=y | |
- CONFIG_NRF_CLOUD_FOTA_FULL_MODEM_UPDATE=y | |
- CONFIG_MCUBOOT_IMG_MANAGER=y | |
- CONFIG_BOOTLOADER_MCUBOOT=y | |
- CONFIG_IMG_MANAGER=y | |
- CONFIG_STREAM_FLASH_ERASE=y | |
- CONFIG_NRF_CLOUD_FOTA=y | |
- CONFIG_NRF_CLOUD_REST=y | |
- CONFIG_FOTA_DOWNLOAD=y | |
- CONFIG_NRF_CLOUD_FOTA_FULL_MODEM_UPDATE=y |
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.
CONFIG_NRF_CLOUD_REST=y
is not needed.
CONFIG_NRF_CLOUD_MQTT=y
in the prj.conf results in the selection of CONFIG_NRF_CLOUD_FOTA
and CONFIG_FOTA_DOWNLOAD
, I will add comments.
{ | ||
Z_TEST_SKIP_IFNDEF(CONFIG_NRF_CLOUD_FOTA_FULL_MODEM_UPDATE); | ||
|
||
#if defined(CONFIG_NRF_CLOUD_FOTA_FULL_MODEM_UPDATE) |
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.
Given how abundant these fmfu
tests are, it seems worthwhile for them to have their own test folder so that you can avoid giving them all ZTEST_SKIP
statements and conditionally defined bodies.
So, like, essentially an entire copy of the fota_common
test folder, but named fota_fmfu
and containing only the tests and fakes required for FMFU
If I understand correctly there would be very few, if any, duplicated fakes between fota_common
and fota_fmfu
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.
i moved them into their own file.
/* Verify that nrf_cloud_pending_fota_job_process succeeds when a pending | ||
* FMFU FOTA validation PASSES. | ||
* The reboot flag should become true. | ||
* Must be called after nrf_cloud_fota_fmfu_dev_set() is successful. |
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.
Can you point out which part of the test guarantees this? I'm guessing it is part of how you have the fakes configured, but it would be useful to have a comment in the test explaining why setting the fakes this way causes nrf_cloud_fota_fmfu_dev_set
to succeed
It would also be good to document what entity internally calls nrf_cloud_fota_fmfu_dev_set
in this case
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.
By default the tests are sorted and ran in alphanumerical order. Test cases may be dependent on this sequence.
- ztest
the name of the test guarantees this.
what entity internally calls nrf_cloud_fota_fmfu_dev_set in this case
the test test_07_nrf_cloud_fota_fmfu_dev_set_pass
results in a successful call to nrf_cloud_fota_fmfu_dev_set
029b7be
to
59df208
Compare
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.
LGTM!
63380be
to
e17b6a4
Compare
Add test suite for nrf_cloud_fota_common.c. IRIS-4790 Signed-off-by: Justin Morton <[email protected]>
Add test suite for nrf_cloud_fota_common.c.
IRIS-4790