Skip to content

Commit da69f01

Browse files
committed
Correct test finding behavior
Scan resources ignores the build dir so we can't set it to something dumb like the directory we want to scan
1 parent bc8b983 commit da69f01

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tools/test_api.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,9 +2077,8 @@ def find_tests(base_dir, target_name, toolchain_name, app_config=None):
20772077
commons = []
20782078

20792079
# Prepare the toolchain
2080-
toolchain = prepare_toolchain(
2081-
[base_dir], base_dir, target_name, toolchain_name, silent=True,
2082-
app_config=app_config)
2080+
toolchain = prepare_toolchain([base_dir], None, target_name, toolchain_name,
2081+
silent=True, app_config=app_config)
20832082

20842083
# Scan the directory for paths to probe for 'TESTS' folders
20852084
base_resources = scan_resources([base_dir], toolchain)

tools/toolchains/arm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,8 @@ def __init__(self, target, *args, **kwargs):
360360
self.flags['common'].append("-mcmse")
361361

362362
# Create Secure library
363-
if target.core == "Cortex-M23" or self.target.core == "Cortex-M33":
363+
if ((target.core == "Cortex-M23" or self.target.core == "Cortex-M33") and
364+
kwargs.get('build_dir', False)):
364365
build_dir = kwargs['build_dir']
365366
secure_file = join(build_dir, "cmse_lib.o")
366367
self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]

0 commit comments

Comments
 (0)