Skip to content

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

Merged
merged 3 commits into from
Nov 1, 2018

Conversation

theotherjimmy
Copy link
Contributor

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 ignore
mbed-os/features/unsupported/tests/mbed/env/test_env.cpp.

This PR stops treating applications like tests.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

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
Copy link
Contributor

@brianesquilona brianesquilona left a 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.

@cmonr cmonr requested review from bridadan and cmonr October 24, 2018 23:55
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.

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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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:
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@cmonr
Copy link
Contributor

cmonr commented Oct 31, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Oct 31, 2018

Build : SUCCESS

Build number : 3524
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8538/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Oct 31, 2018

@mbed-ci
Copy link

mbed-ci commented Nov 1, 2018

@cmonr
Copy link
Contributor

cmonr commented Nov 1, 2018

/morph test

@mbed-ci
Copy link

mbed-ci commented Nov 1, 2018

@cmonr cmonr merged commit 9c5fc7d into ARMmbed:master Nov 1, 2018
@cmonr cmonr removed the needs: CI label Nov 1, 2018
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.

5 participants