Skip to content

Commit ad5e94a

Browse files
committed
Convert TZ target name 'NPSA' to test spec platform name
1. All TZ targets should have name pattern: PLATFORM_[PSA_/NPSA_]S/NS, where: (1) 'PLATFORM' for test spec platform name (2) 'PSA/NPSA' for PSA/non-PSA targets. Defaults to PSA target on absent. (3) 'S'/'NS' for secure/non-secure targets 2. Secure target may participate in Greentea, so its name is also truncated here.
1 parent f5dd7db commit ad5e94a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tools/test_api.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,20 +2274,21 @@ def test_spec_from_test_builds(test_builds):
22742274
for build in test_builds:
22752275
# Convert TZ target name to test spec platform name
22762276
#
2277-
# 1. All TZ targets should have name pattern: PLATFORM_[PSA_]S/NS, where:
2277+
# 1. All TZ targets should have name pattern: PLATFORM_[PSA_/NPSA_]S/NS, where:
22782278
# (1) 'PLATFORM' for test spec platform name
2279-
# (2) 'PSA' is optional to distinguish PSA/non-PSA targets, especially when
2280-
# both PSA/non-PSA targets are supported
2279+
# (2) 'PSA/NPSA' for PSA/non-PSA targets. Defaults to PSA target on absent.
22812280
# (3) 'S'/'NS' for secure/non-secure targets
22822281
# 2. Secure target may participate in Greentea, so its name is also truncated here.
22832282
if Target.get_target(test_builds[build]['platform']).is_TrustZone_target:
22842283
if test_builds[build]['platform'].endswith('_NS'):
22852284
test_builds[build]['platform'] = test_builds[build]['platform'][:-3]
22862285
elif test_builds[build]['platform'].endswith('_S'):
22872286
test_builds[build]['platform'] = test_builds[build]['platform'][:-2]
2288-
2287+
22892288
if test_builds[build]['platform'].endswith('_PSA'):
22902289
test_builds[build]['platform'] = test_builds[build]['platform'][:-4]
2290+
elif test_builds[build]['platform'].endswith('_NPSA'):
2291+
test_builds[build]['platform'] = test_builds[build]['platform'][:-5]
22912292
return {
22922293
"builds": test_builds
22932294
}

0 commit comments

Comments
 (0)