Skip to content

Commit 5a87dbb

Browse files
committed
M2351: Translate target name to platform name
Translate target name 'NU_PFM_M2351'+SUFFIX to platform name 'NUMAKER_PFM_M2351' for the NuMaker-PFM-M2351 board: 1. Online database has limit of max 20 chars on target name, so we cannot follow the naming rule 'NUMAKER_PFM_M2351'+SUFFIX for this board. 2. The registered platform name 'NUMAKER_PFM_M2351' in mbed-os-tools keeps unchanged for compatibility.
1 parent 8a79f21 commit 5a87dbb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tools/test_api.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2272,7 +2272,17 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
22722272

22732273
def test_spec_from_test_builds(test_builds):
22742274
for build in test_builds:
2275-
if Target.get_target(test_builds[build]['platform']).is_PSA_non_secure_target:
2275+
if test_builds[build]['platform'][:12] == 'NU_PFM_M2351':
2276+
# Translate target name 'NU_PFM_M2351'+SUFFIX to platform name
2277+
# 'NUMAKER_PFM_M2351' for the NuMaker-PFM-M2351 board:
2278+
#
2279+
# 1. Online database has limit of max 20 chars on target name,
2280+
# so we cannot follow the naming rule 'NUMAKER_PFM_M2351'+
2281+
# SUFFIX for this board.
2282+
# 2. The registered platform name 'NUMAKER_PFM_M2351' in mbed-os-tools
2283+
# keeps unchanged for compatibility.
2284+
test_builds[build]['platform'] = 'NUMAKER_PFM_M2351'
2285+
elif Target.get_target(test_builds[build]['platform']).is_PSA_non_secure_target:
22762286
if test_builds[build]['platform'].endswith('_NS'):
22772287
test_builds[build]['platform'] = test_builds[build]['platform'][:-3]
22782288
if test_builds[build]['platform'].endswith('_PSA'):

0 commit comments

Comments
 (0)