Skip to content

Use relative paths for source and build dirs when testing #699

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 1 commit into from
Jun 19, 2018

Conversation

bridadan
Copy link
Contributor

This was discovered when doing some investigation for ARMmbed/mbed-os#6861.

Currently, mbed test is passing absolute paths for the --source and --build options. This path is not shortened by the Mbed OS tools when compiling, so the include paths are much longer than they need to be. This alters mbed test to instead pass relative paths to both --source and --build.

While this won't fix the issue completely, it will drastically reduce the include path lengths when using mbed test.

Steps to reproduce*

Before this patch, if you run mbed test -m NRF52_DK -t GCC_ARM in the root of mbed-os at commit ed9a1f1327f5208fd462c5a6938696ee15e393f1 (recent commit off master branch), it will immediately fail to compile.

After applying this patch, you will be able to compile and test.

Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

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

Nice diff.

@screamerbg screamerbg self-requested a review June 18, 2018 19:31
@screamerbg
Copy link
Contributor

I like the patch but I think there's bigger fundamental problem with long paths on Windows and the Mbed OS codebase paths, etc. See email thread from @dlfryar. Not sure whether this helps or smears the problem or postpones it for another time.

@bridadan
Copy link
Contributor Author

This change brings the way paths are handled in line with the compile command. So more of a clarity and consistency thing than anything else.

Copy link
Contributor

@screamerbg screamerbg left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks.

@screamerbg screamerbg merged commit d344702 into ARMmbed:master Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants