-
Notifications
You must be signed in to change notification settings - Fork 3k
mbed test: add argument --ignore
to allow passing in mbedignore patterns
#6833
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
Simply passes the parameter through when building with test.py For more details see ARMmbed/mbed-os#6833
Please resolve the conflict |
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.
I like the implementation, except that it adds a parameter to build_library, which already has ~25 arguments.
Wow it's hard to write code for such a fast moving target as mbed sometimes! I built this in a couple of hours from the head of master just yesterday and it's already in conflict! Yes I get that the build library function has a lot of args already (what's one more then) but I don't see that as a particularly big problem? I don't think it's worth a refactor just because it's big... especially as that'll cause merge fails for the next contributor ;-) |
Speaking of merge issues, particularly when you've got functions with lots of args.... this is why |
…re args In particular this allows ignoring a project main.cpp file when running unit tests
06ca622
to
badd753
Compare
@andrewleech Yeah, I'll trim down the number of arguments. I mentioned that because a large number of arguments indicates that we have a leaky abstraction or a poorly factored set of functions. I'm working on this, and I can already see how to fit your extension into my new vision, so I'm not so worried about it :D You're welcome do change the argument style to the one-per-line style, as long as you do it in another commit! |
@andrewleech Black looks like a nice tool. Thanks for the link. I may apply it over the code base one file at a time :D |
/morph build |
Build : SUCCESSBuild number : 1968 Triggering tests/morph test |
Test : SUCCESSBuild number : 1781 |
Exporter Build : SUCCESSBuild number : 1619 |
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.
@andrewleech I just noticed that you did not pass on the ignore from build_tests
to individual invocations of build_project
. Why is that?
@theotherjimmy I initially only implemented the minimum required to add the option to unit tests, specifically to resolve the very old issue of multiple main's when running I can see a purpose to having this arg for other mbed operations so have now adding it to (I think) all compile / build / export operations. |
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.
Looks good. Thanks.
Travis failures were fetch failures. I restarted travis. |
/morph build |
Build : SUCCESSBuild number : 1986 Triggering tests/morph test |
Test : SUCCESSBuild number : 1796 |
Exporter Build : SUCCESSBuild number : 1636 |
/morph mbed2-build |
Description
This patch adds an extra arg
--ignore
totest.py
for use when running unit tests.--ignore
lets you specify a comma separated list of extra lines to dynamically add to mbedignore for the building of tests.In particular this simplifies ignoring a project main.cpp file when running unit tests to remove the multiple definition of
main(void)
function.Example:
For this to be used with mbed cli tool the --ignore arg needs to be added there to only pass it on to test.py, else it gets passed to mbed-gt tool as well which then fails due to unknown arg.
Pull request type