-
Notifications
You must be signed in to change notification settings - Fork 178
add docs for integration tests #1144
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 docs for integration tests #1144
Conversation
Make initial copy edits.
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 PR. I left some questions.
@@ -0,0 +1,65 @@ | |||
# Integration tests | |||
|
|||
Mbed OS provides a set of integration tests to help you identify integration issues around storage devices and connectivity devices. |
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.
This is only for people porting, right?
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.
Yes, this is mainly for people porting, but can also help customers and developers with custom targets and to verify that the platform works well in their environment (in case there are some kind of network limitations).
$ mbed test -t <toolchain> -m <platform> -n *integration-* -DINTEGRATION_TESTS -v | ||
``` | ||
|
||
If a platform doesn't have default storage or connectivity device and may require extra shield to run the integration test. In this case, you can pass a `target_extended.json` file in the command-line to configure the target: |
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.
Does this mean if a platform requires an extra shield, you have have to pass target_extended.json
in the command-line? Or that if it doesn't have storage and connectivity by default, it requires an extra shield?
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.
Both statements are correct. The usage of a shield and target_extended.json
is only required if the platform doesn't connectivity and storage. The user can pass target_extended.json
or any similar file with the similar of configuration.
$ mbed test -t <toolchain> -m <platform> -n *integration-* -DINTEGRATION_TESTS --app-config TESTS\integration\COMMON\target_extended.json -v | ||
``` | ||
|
||
A preconfiguration file is defined in the COMMON folder, and that file covers some of the platform connectivity and storage combinations. However, this preconfiguration file might contain some compoments drivers not included in `mbed-os` (for example, `WIFI_WIZFI310` and `NUSD`). You must add those drivers manually. If you have your own platform or want to define your own configuration, please follow the [configuration guide](#tests-configuration). |
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.
When would it contain drivers not included in mbed-os
? To add them manually, do they just follow the normal porting targets sections?
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.
There are multiple reasons why we haven't included a driver in mbed-os
, maybe we simply haven't had the chance to do it.
To add a library, a user can just follow the mbed-cli docs: https://os.mbed.com/docs/mbed-os/latest/tools/working-with-mbed-cli.html
|
||
If required, edit the `target_extended.json` file, and create a new entry under `target_overrides` with the target name for your device: | ||
|
||
- **Connectivity** - Specify the default connectivity type for your target. It's essential with targets that lack default connectivity set in `targets.json` or for targets that support multiple connectivity options. For example: |
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.
Is it optional for targets that don't lack default connectivity or support multiple connectivity options?
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.
It's required for targets/platforms that don't have any type of IP connectivity.
It's also required in case the user wants to override the default connectivity option (replace by another available onboard or external shield). Hope this helps?
"target.components_add" : ["SD"], | ||
``` | ||
|
||
Valid options are `SD`, `SPIF`, `QSPIF` and `FLASHIAP` (not recommended). For more available options, please see the [block device components](https://github.com/ARMmbed/mbed-os/tree/master/components/storage/blockdevice). |
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.
Why isn't FLASHIAP recommended? Is it the only one of the group not recommended?
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.
It's not recommended because of the risks of wearing out the flash memory of the device.
We should probably remove this statement as afaik we're not commenting on the possibility of its usage.
I understand it's the only not recommended.
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.
@AnotherButler find comments - let me know if you need further information.
Update content with feedback from comments.
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.
@MarceloSalazar Thanks for the quick responses 👍 Please review my latest changes to make sure they are accurate.
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.
This looks really good - thanks!
Apply changes from PR #1144 to v5.13.
This the docs for integration tests.
ARMmbed/mbed-os#11276