Skip to content

Added list options for --supported command #3993

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
merged 4 commits into from
Apr 12, 2017

Conversation

mbartling
Copy link
Contributor

Description

Added the ability to list toolchains, ides, and targets in addition to just dumping them as a matrix. This is useful for bash tab completion and other piping.

Status

READY/IN DEVELOPMENT/HOLD

Migrations

If this PR changes any APIs or behaviors, give a short description of what API users should do when this PR is merged.

NO

Todos

  • Tests
  • Documentation

@bridadan
Copy link
Contributor

Hi @mbartling, this will definitely be useful. Would you mind posting an example of how to use the new options and their output? I'm not as familiar with the nargs="?" option for argparse.

@adbridge
Copy link
Contributor

@mbartling please update the PR title to be more meaningful.

@mbartling mbartling changed the title Supported lists Added list options for --supported command Mar 23, 2017
@mbartling
Copy link
Contributor Author

@bridadan The nargs="?" and addition of the const value is so I don't break backwards compatibility. The former specifies that there are 0 or 1 arguments following the target subcommand. So the signature of the command line interface becomes
make.py [-S|-supported [toolchains|targets]] ...

Here is a high level example (using mbed cli):

$ mbed compile --supported toolchains
> GCC_ARM
> IAR
> ARM
$
$ mbed compile --supported
> [ORIGINAL_MATRIX]

Here is an example using mbed-os tools directly

$ python tools/make.py --supported toolchains
> GCC_ARM
> IAR
> ARM

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok I seem thanks for explanation. I only ask because I don't think nargs='?' is used anywhere else in the tools. But this is really good to know and use in the future! I didn't even know this capability existed 😄

@bridadan
Copy link
Contributor

/morph test

@mbartling
Copy link
Contributor Author

mbartling commented Mar 23, 2017

morph test? is that part of the test harness?

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1731

All builds and test passed!

@bridadan
Copy link
Contributor

morph test? is that part of the test harness?

Yes 😄 (see above)

@bridadan
Copy link
Contributor

@0xc0170 Everything seems good to my eye

@bridadan
Copy link
Contributor

Actually crud, just remembered this touches exporters too.

/morph export-build

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph export-build

Output

mbed Build Number: 141

Exporter Build failed!

@bridadan
Copy link
Contributor

bridadan commented Mar 24, 2017

Ok, so this failure was due to the fact the nrf52840 CMSIS pack wasn't present on the CI machines. I just added it now so we SHOULD be good to go. Running again...

Getting ahead of myself, #4021 needs to come in first.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 29, 2017

/morph export-build

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph export-build

@bridadan
Copy link
Contributor

@mbartling Can you resolve the conflict? We will rerun the CI after

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 30, 2017

Merge branch 'master' into supported-lists

Please rebase, do not merge if possible?

@mbartling
Copy link
Contributor Author

@0xc0170 rebased with master

@bridadan
Copy link
Contributor

bridadan commented Apr 4, 2017

@0xc0170 --list is only used internally in test.py, we don't actually use it anywhere else. --supported is used to tell you what you can supply to the required arguments like --target(-m), --toolchain(-t), --ide(-i), etc. --list is an action that gives you information on what test cases are available given a -m and a -t.

TL;DR they are separate options with two important purposes 😄

@bridadan
Copy link
Contributor

bridadan commented Apr 7, 2017

I've restarted the last Jenkins on this PR. Hopefully we can finally get this merged!

@mbartling
Copy link
Contributor Author

@bridadan @0xc0170 bump :)

@bridadan
Copy link
Contributor

I'm assuming a merge party will happen around the time of the release of 5.4.3, so get ready 🎉 🎈

@sg-
Copy link
Contributor

sg- commented Apr 10, 2017

/morph export-build

@mbed-bot
Copy link

Result: ABORTED

Your command has finished executing! Here's what you wrote!

/morph export-build

Output

mbed Build Number: 157

Example Prep failed!

@bridadan
Copy link
Contributor

/morph export-build

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph export-build

Output

mbed Build Number: 158

All exports and builds passed!

@mbartling
Copy link
Contributor Author

🕺 🎉 🌮

@bridadan
Copy link
Contributor

@0xc0170 Hopefully this can get in before something else blocks it 😛

@theotherjimmy theotherjimmy merged commit 65adf44 into ARMmbed:master Apr 12, 2017
@theotherjimmy
Copy link
Contributor

@bridadan got your back

mbartling added a commit to mbartling/mbed-cli that referenced this pull request Apr 18, 2017
@ohagendorf
Copy link
Contributor

This PR was merged but didn't get a label in which release version it is planned to be added?
Is it not decided or is it maybe forgotten?

@theotherjimmy
Copy link
Contributor

Thanks for the reminder @ohagendorf

@adbridge
Copy link
Contributor

This change relies on #3997 which is marked to go in for 5.5.0, thus relabeling this one accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants