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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2589,12 +2589,12 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
with cd(program.path):
# Setup the source path if not specified
if not source or len(source) == 0:
source = [program.path]
source = [os.path.relpath(program.path, orig_path)]

# Setup the build path if not specified
build_path = build
if not build_path:
build_path = os.path.join(program.path, program.build_dir, 'tests', target.upper(), tchain.upper())
build_path = os.path.join(os.path.relpath(program.path, orig_path), program.build_dir, 'tests', target.upper(), tchain.upper())

if test_spec:
# Preserve path to given test spec
Expand Down