ARMmbed / mbed-tools

⚠️ Beta Status: New command line tooling for Mbed OS
Apache License 2.0
45 stars 30 forks source link

configure: Add --profile for profile selection #293

Closed LDong-Arm closed 3 years ago

LDong-Arm commented 3 years ago

Description

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 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 run mbed-tools compile with --profile <profile>, or manually run cmake with -DCMAKE_BUILD_TYPE=<profile> after mbed-tools configure.

Also add missing test for --profile of mbed-tools compile.

Fixes #262

Test Coverage

LDong-Arm commented 3 years ago

I first made the fix locally while working on #292 (--app-config) as they are quite similar, but decided to not include this there as more time was needed to add a test. Now it's done here.

codecov[bot] commented 3 years ago

Codecov Report

Merging #293 (923b263) into master (a97be74) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #293   +/-   ##
=======================================
  Coverage   97.08%   97.08%           
=======================================
  Files          92       92           
  Lines        2781     2782    +1     
=======================================
+ Hits         2700     2701    +1     
  Misses         81       81           
Impacted Files Coverage Δ
src/mbed_tools/cli/configure.py 100.00% <100.00%> (ø)
LDong-Arm commented 3 years ago

@ARMmbed/mbed-os-core

rwalton-arm commented 3 years ago

Travis timed out. Could you force push to trigger it again?

LDong-Arm commented 3 years ago

Travis timed out. Could you force push to trigger it again?

Done. Waiting for CI to finish.