Skip to content

Commit

Permalink
Merge pull request #85 from bridadan/build-tests-fix
Browse files Browse the repository at this point in the history
Fixing build issues for tests
  • Loading branch information
sg- committed May 10, 2016
2 parents 904ea44 + 4ae7d54 commit 9c38f2a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 9 additions & 2 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

from tools.test_api import test_path_to_name, find_tests, print_tests, build_tests, test_spec_from_test_build
from tools.options import get_default_options_parser
from tools.build_api import build_project
from tools.build_api import build_project, build_library
from tools.targets import TARGET_MAP
from tools.utils import mkdir

Expand Down Expand Up @@ -115,10 +115,17 @@
if not base_source_paths:
base_source_paths = ['.']


target = TARGET_MAP[options.mcu]

lib_build_res = build_library(base_source_paths, options.build_dir, target, options.tool,
options=options.options,
jobs=options.jobs,
clean=options.clean,
archive=False)

# Build all the tests
test_build = build_tests(tests, base_source_paths, options.build_dir, target, options.tool,
test_build = build_tests(tests, [options.build_dir], options.build_dir, target, options.tool,
options=options.options,
clean=options.clean,
jobs=options.jobs)
Expand Down
6 changes: 3 additions & 3 deletions tools/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2041,13 +2041,13 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
}

for test_name, test_path in tests.iteritems():
test_build_path = os.path.join(build_path, test_path)
src_path = base_source_paths + [test_path]
artifact_name = os.path.join(test_path, test_name)
bin_file = build_project(src_path, build_path, target, toolchain_name,
bin_file = build_project(src_path, test_build_path, target, toolchain_name,
options=options,
jobs=jobs,
clean=clean,
name=artifact_name,
name=test_name,
report=report,
properties=properties,
verbose=verbose)
Expand Down

0 comments on commit 9c38f2a

Please sign in to comment.