Use relative paths for source and build dirs when testing #699
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 altersmbed 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 ofmbed-os
at commited9a1f1327f5208fd462c5a6938696ee15e393f1
(recent commit off master branch), it will immediately fail to compile.After applying this patch, you will be able to compile and test.