-
Notifications
You must be signed in to change notification settings - Fork 3k
Unit tests: Move storage stubs into the storage directory #14862
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Move storage stubs from UNITTESTS/stubs into components inside the top-level storage directory. Specifically, * storage/blockdevice/tests/UNITTESTS/doubles/ for BlockDevice stubs. * storage/kvstore/filesystemstore/tests/UNITTESTS/ for a stub used by the FileSystemStore test. The stub has been renamed from kv_config_stub.cpp to filesystemstore_kv_config_stub.cpp, to make it evident why it doesn't go into storage/kvstore/kv_config/.
The header `mbed.h` pulls in headers from a number of Mbed OS components that are not necessarily used. It was intended for user applications only, and libraries and unit tests should explicitly include library headers it uses to limit dependencies. This change avoids having to link unnecessary libraries in storage unit tests' CMake definitions.
@LDong-Arm, thank you for your changes. |
|
Create a CMake target mbed-headers-blockdevice to separate BlockDevice headers from the generic mbed-headers-storage. Update tests to use it.
Create a CMake target mbed-headers-filesystem to separate FileSystem headers from the generic mbed-headers-storage. Update tests to use it.
Create a CMake target mbed-headers-kvstore to separate KVStore headers from the generic mbed-headers-storage. Update tests to use it.
Ready for review. |
rajkan01
approved these changes
Jul 6, 2021
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
0xc0170
approved these changes
Jul 6, 2021
Ci started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
Currently, unit test stubs are mostly located in the top-level UNITTESTS/stubs directory, partly duplicating the way libraries are structured. To make test stubs and their CMake definitions better organized, we relocate them into the libraries being tested. This PR covers stubs for storage.
Fixes #14792
For details, refer to the commit messages.
Impact of changes
Migration actions required
Documentation
None.
Pull request type
Test results
Reviewers
@ARMmbed/mbed-os-core