Skip to content
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

Convert TZ target name 'NPSA' to test spec platform name #11487

Merged
merged 2 commits into from Sep 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 5 additions & 6 deletions tools/test_api.py
Expand Up @@ -2274,20 +2274,19 @@ def test_spec_from_test_builds(test_builds):
for build in test_builds:
# Convert TZ target name to test spec platform name
#
# 1. All TZ targets should have name pattern: PLATFORM_[PSA_]S/NS, where:
# 1. All TZ targets should have name pattern: PLATFORM_[NPSA_]S/NS, where:
# (1) 'PLATFORM' for test spec platform name
# (2) 'PSA' is optional to distinguish PSA/non-PSA targets, especially when
# both PSA/non-PSA targets are supported
# (2) 'NPSA' for non-PSA targets. Defaults to PSA target if absent.
# (3) 'S'/'NS' for secure/non-secure targets
# 2. Secure target may participate in Greentea, so its name is also truncated here.
if Target.get_target(test_builds[build]['platform']).is_TrustZone_target:
if test_builds[build]['platform'].endswith('_NS'):
test_builds[build]['platform'] = test_builds[build]['platform'][:-3]
elif test_builds[build]['platform'].endswith('_S'):
test_builds[build]['platform'] = test_builds[build]['platform'][:-2]
if test_builds[build]['platform'].endswith('_PSA'):
test_builds[build]['platform'] = test_builds[build]['platform'][:-4]

if test_builds[build]['platform'].endswith('_NPSA'):
test_builds[build]['platform'] = test_builds[build]['platform'][:-5]
return {
"builds": test_builds
}