-
Notifications
You must be signed in to change notification settings - Fork 3k
Calculate FlashIAPBlockDevice start address and size automatically for test only #9268
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
Conversation
@yossi2le, thank you for your changes. |
Is this fixing #9255 ? |
Can you add this to the commit msg (at least some info, it's one liner at the moment). |
mbed::FlashIAP flash_driver; | ||
|
||
ret = flash_driver.init(); | ||
TEST_ASSERT_EQUAL(0, ret); |
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.
how does this work? assert equal and the condition below returns to the next test case (does it reach line 1273?).
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.
Thanks for the remark. The code will get to 1273 if the ret value is 0. The only problem is that the if after the ASSERT is redundant. I have removed it and updated the commit message.
It seems OK :-)
|
Yes, this is fixing #9255. I missed the fact that you open a bug for that. |
… enabled fails the FlashIAP block device tests exists under the component directory. That's because they have no start address and size configured in the mbed_lib.json file. In order to simplify the test for targets with no definitions in the mbed_lib.json, the test will calculate the start address as the first sector after the application ends and up to the max size available.
f35f9a0
to
bdeb545
Compare
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
This PR fixes an issue in which boards with FlashIAP block device enabled fails the FlashIAP block device tests exists under the component directory. That's because they have no start address and size configured in the mbed_lib.json file.
In order to simplify the test for targets with no definitions in the mbed_lib.json, the test will calculate the start address as the first sector after the application ends and up to the max size available.
Pull request type
Reviewers