From 6d8606fe4d1b4cd6927fc9cf74b33af8a1f06d53 Mon Sep 17 00:00:00 2001 From: Chun-Chieh Li Date: Mon, 16 Sep 2019 09:34:52 +0800 Subject: [PATCH] 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. --- tools/test_api.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/test_api.py b/tools/test_api.py index 1fd5fe83b2..93cf9c970f 100644 --- a/tools/test_api.py +++ b/tools/test_api.py @@ -2274,10 +2274,9 @@ 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_[PSA_/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) '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. if Target.get_target(test_builds[build]['platform']).is_TrustZone_target: @@ -2285,9 +2284,11 @@ def test_spec_from_test_builds(test_builds): 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] + elif test_builds[build]['platform'].endswith('_NPSA'): + test_builds[build]['platform'] = test_builds[build]['platform'][:-5] return { "builds": test_builds }