-
Notifications
You must be signed in to change notification settings - Fork 3k
Rework make.py CLI to avoid treating apps as tests #8538
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
f411e30
to
679669d
Compare
Prior to this changeset, applications were all compiled as test #0. This can lead to unexpected behavoir. In particluar, it's weirdly impossible to use a `.mbedignore` file to ignore `mbed-os/features/unsupported/tests/mbed/env/test_env.cpp`. This PR stops treating applications like tests. [x] Fix [ ] Refactor [ ] Target update [ ] Functionality change [ ] Docs update [ ] Test update [ ] Breaking change
679669d
to
81013e9
Compare
bd2ed19
to
8f07b9e
Compare
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.
Tested to compile Daplink cli support.
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.
Pending my two questions below, changes look good to me.
if options.source_dir is not None: | ||
test.source_dir = options.source_dir | ||
build_dir = options.source_dir |
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 can't seem to find the equivalent of lines 268-270 in the revised make.py
. It looks like in the old make.py
, if --source
was specified and it was building tests, it would reassign the test's source dir as well as the build dir to the specified --source
directory. Now this old behavior doesn't make much sense to me so I'm fine with the removal, but just wanted to make sure that it was removed for a similar reason.
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.
Above, a --source without a --build causes an argument error, so this line was never executed.
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 point!
print('Update Image: %s' % update_file) | ||
print('Image: %s' % bin_file) | ||
|
||
if options.disk: |
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 like the flashing, reset, and a serial output was removed as well. I'm totally fine with this, especially since this is handled by Mbed CLI now. Just making sure the removal was for similar reasons.
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.
That's why they were removed.
/morph build |
Build : SUCCESSBuild number : 3524 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 3141 |
Test : FAILUREBuild number : 3308 |
/morph test |
Test : SUCCESSBuild number : 3312 |
Description
Prior to this changeset, applications were all compiled as test #0. This
can lead to unexpected behavoir. In particluar, it's weirdly impossible
to use a
.mbedignore
file to ignorembed-os/features/unsupported/tests/mbed/env/test_env.cpp
.This PR stops treating applications like tests.
Pull request type