-
Notifications
You must be signed in to change notification settings - Fork 3k
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
CMake: Replace MBED_TEST_LINK_LIBRARIES
with MBED_TEST_BAREMETAL
#14874
Merged
Patater
merged 2 commits into
ARMmbed:master
from
LDong-Arm:optional_MBED_TEST_LINK_LIBRARIES
Jul 6, 2021
Merged
CMake: Replace MBED_TEST_LINK_LIBRARIES
with MBED_TEST_BAREMETAL
#14874
Patater
merged 2 commits into
ARMmbed:master
from
LDong-Arm:optional_MBED_TEST_LINK_LIBRARIES
Jul 6, 2021
Conversation
This file contains 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
@LDong-Arm, thank you for your changes. |
Patater
previously approved these changes
Jul 6, 2021
This PR cannot be merged due to conflicts. Please rebase to resolve them. |
0xc0170
previously approved these changes
Jul 6, 2021
I've merged MBED_PATH removal PR, rebase required and CI will be the next. |
The coding standards of Mbed OS require indentation of four spaces.
ed23c1d
to
b8dc717
Compare
Currently we have `MBED_TEST_LINK_LIBRARIES` for specifying * Whether to link `mbed-os` or `mbed-baremetal` * Any additional libraries we want tests to link It's not fit for purpose anymore, because * No flavor of Mbed OS is selected by default, but we should've really defaulted to `mbed-os`, the full RTOS version. Build doesn't work unless `-DMBED_TEST_LINK_LIBRARIES=<...>` is passed, which is redundant. * A test should never need additional libraries passed via command line - its `CMakeLists.txt` should specify what it links. This commit replaces `MBED_TEST_LINK_LIBRARIES` with a new option `MBED_TEST_BAREMETAL` to build a test with either RTOS (default) or without it (by passing `-DMBED_TEST_BAREMETAL=ON`).
Pull request has been modified.
b8dc717
to
f4d551e
Compare
Patater
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
Fixes #14871
Currently we have
MBED_TEST_LINK_LIBRARIES
for specifyingmbed-os
ormbed-baremetal
It's not fit for purpose anymore, because
mbed-os
, the full RTOS version. Build doesn't work unless-DMBED_TEST_LINK_LIBRARIES=<...>
is passed, which is redundant.CMakeLists.txt
should specify what it link.This PR replaces
MBED_TEST_LINK_LIBRARIES
with a new optionMBED_TEST_BAREMETAL
to build a test with either RTOS (default) or without it (by passing-DMBED_TEST_BAREMETAL=ON
).Impact of changes
Now
MBED_TEST_LINK_LIBRARIES
is not needed/does not work anymore.MBED_TEST_BAREMETAL
selects the bare metal profile for a Greentea test.Migration actions required
No change is needed for existing tests. Pass the new CMake option when needed, as instructed by the updated
tools/cmake/README.md
.Documentation
How to build a greentea test in
tools/cmake/README.md
has been updated.Pull request type
Test results
CMake support for Greentea tests is not covered in CI yet. Manual testing:
platform/tests/TESTS/mbed_platform/system_reset
: full profile and bare metal profilertos/tests/TESTS/mbed_rtos/basic/
: as expected, full profile builds and bare metal profile (-DMBED_TEST_BAREMETAL=ON
) doesn'tReviewers
@ARMmbed/mbed-os-core