-
Notifications
You must be signed in to change notification settings - Fork 28
configure: Add --profile for profile selection #293
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
5d311d9
to
71eea10
Compare
I first made the fix locally while working on #292 ( |
Codecov Report
@@ Coverage Diff @@
## master #293 +/- ##
=======================================
Coverage 97.08% 97.08%
=======================================
Files 92 92
Lines 2781 2782 +1
=======================================
+ Hits 2700 2701 +1
Misses 81 81
|
@ARMmbed/mbed-os-core |
Travis timed out. Could you force push to trigger it again? |
71eea10
to
e1355e2
Compare
Done. Waiting for CI to finish. |
@@ -186,6 +186,29 @@ def test_app_config_used_when_passed( | |||
generate_config.assert_called_once_with(target.upper(), toolchain.upper(), program) | |||
self.assertEqual(program.files.app_config_file, app_config_path) | |||
|
|||
def test_profile_used_when_passed( |
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.
Good catch.
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.
The `compile` subcommand supports `--profile` to specify build profile, but a test for it is missing. This commit adds a test.
As `mbed-tools compile` supports `-b`, `--profile` for selecting a build profile, the same should exist for `mbed-tools configure` as users may want to manually run the build step using `cmake` in some cases. This commit implements it and supplies a test. Note: This only affects the build directory - it has no impact on the contents of `mbed_config.cmake`. To actually build an application with a profile, a user needs to either run `mbed-tools compile` with `--profile <profile>`, or manually run `cmake` with `-DCMAKE_BUILD_TYPE=<profile>` after `mbed-tools configure`. Fixes ARMmbed#262
e1355e2
to
923b263
Compare
Description
As
mbed-tools compile
supports-b
,--profile
for selecting a build profile, the same should exist formbed-tools configure
as users may want to manually run the build step usingcmake
in some cases. This PR implements it and supplies a test.Note: This only affects the build directory - it has no impact on the contents of
mbed_config.cmake
. To actually build an application with a profile, a user needs to either runmbed-tools compile
with--profile <profile>
, or manually runcmake
with-DCMAKE_BUILD_TYPE=<profile>
aftermbed-tools configure
.Also add missing test for
--profile
ofmbed-tools compile
.Fixes #262
Test Coverage