-
Notifications
You must be signed in to change notification settings - Fork 28
configure/build: Support user-specified application configuration #292
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
Codecov Report
@@ Coverage Diff @@
## master #292 +/- ##
=======================================
Coverage 97.08% 97.08%
=======================================
Files 92 92
Lines 2779 2781 +2
=======================================
+ Hits 2698 2700 +2
Misses 81 81
|
The Travis failure has nothing to do with this PR or mbed-tools. I've created a fix for it: ARMmbed/mbed-os#14829 Update: See ARMmbed/mbed-os#14829 (comment). The proper fix would be migrating K64F from ARDUINO form factor to ARDUINO_UNO form factor. The main issue to track Pin Names migration of all targets is ARMmbed/mbed-os#14484. Alternatively, we can use a different target in Travis for the time being. |
This commit removes the default arguments of the `build()` function to rely on click to provide default values. As for `--toolchain` and `--mbed-targets` which must be provided by the user, we enable `required=True` to let click check them for us. This is consistent with how arguments are checked for the `configure()` function. Despite the main benefit of taking advantage of click's built-in check, a slight drawback is that click only checks one argument at a time, instead of asking the user to specify both toolchain and mbed-target. But this is okay because the user needs to pass both in order to not get any errors eventually. The test case where both target and toolchain options are missing has been removed accordingly. The existing tests for one missing option (one for toolchain, one for target) are sufficient.
Add an option `--app-config` to `configure` and `compile`, to allow users to specify an application configuration file. If unspecified, mbed-tools will use `mbed_app.json` if the latter exists. Tests are provided. Fixes ARMmbed#291
Rebased and updated commit message |
Description
Add an option
--app-config
toconfigure
andcompile
, to allow users to specify an application configuration file. If unspecified, mbed-tools will usembed_app.json
if the latter exists.Tests are provided.
Fixes #291
Also: Remove default arguments of
build()
that duplicate what we set with click.Test Coverage