LAVA Helper: Extract 'binaries' from tests to platform configs

Binariy names are only related to platforms. There is no need to
set binariy names in each test configs.

Extract 'binaries' to platform configs to avoid redundant codes.

Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I2eb62076f150452eb9325337a75efdf059daf43b
diff --git a/lava_helper/jinja2_templates/base.jinja2 b/lava_helper/jinja2_templates/base.jinja2
index 22c9d6b..d3159fa 100644
--- a/lava_helper/jinja2_templates/base.jinja2
+++ b/lava_helper/jinja2_templates/base.jinja2
@@ -1,5 +1,5 @@
 {#------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -14,8 +14,6 @@
   platform: {{ platform }}
   build_name: {{ build_name }}
   recovery_image_url: {{ recovery_image_url }}
-  firmware_url: {{ firmware_url }}
-  bootloader_url: {{ bootloader_url }}
   build_job_url: {{ build_job_url }}
 {%- endblock %}
 
diff --git a/lava_helper/jinja2_templates/fvp_mps2.jinja2 b/lava_helper/jinja2_templates/fvp_mps2.jinja2
index 9c78d74..5aea418 100644
--- a/lava_helper/jinja2_templates/fvp_mps2.jinja2
+++ b/lava_helper/jinja2_templates/fvp_mps2.jinja2
@@ -1,5 +1,5 @@
 {#------------------------------------------------------------------------------
-# Copyright (c) 2018-2019, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2018-2022, Arm Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -20,10 +20,10 @@
     namespace: docker
     to: fvp
     images:
-      ns:
-        url: {{ firmware_url }}
-      s:
-        url: {{ bootloader_url }}
+      app:
+        url: {{ application_url }}
+      data:
+        url: {{ data_url }}
 {%- if enable_code_coverage %}
       cc:
         url: {{ coverage_trace_plugin }}
@@ -44,8 +44,8 @@
     license_variable: '{{ license_variable }}'
     use_telnet: False
     arguments:
-    -  "--application cpu0={NS}"
-    -  "--data cpu0={S}@{{ data_bin_offset }}"
+    -  "--application cpu0={APP}"
+    -  "--data cpu0={DATA}@{{ data_bin_offset }}"
     -  "--parameter fvp_mps2.platform_type=2"
     -  "--parameter cpu0.baseline={{ cpu0_baseline }}"
     -  "--parameter cpu0.INITVTOR_S={{ cpu0_initvtor_s }}"
diff --git a/lava_helper/jinja2_templates/mps2.jinja2 b/lava_helper/jinja2_templates/mps2.jinja2
index 7d506cf..c1a726c 100644
--- a/lava_helper/jinja2_templates/mps2.jinja2
+++ b/lava_helper/jinja2_templates/mps2.jinja2
@@ -1,5 +1,5 @@
 {#------------------------------------------------------------------------------
-# Copyright (c) 2018-2019, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2018-2022, Arm Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -7,6 +7,8 @@
 {% extends 'jinja2_templates/base.jinja2' %}
 {% block metadata %}
 {{ super() }}
+  firmware_url: {{ firmware_url }}
+  bootloader_url: {{ bootloader_url }}
 {% endblock %}
 {% block base %}
 {{ super() }}
diff --git a/lava_helper/jinja2_templates/qemu_mps2_bl2.jinja2 b/lava_helper/jinja2_templates/qemu_mps2_bl2.jinja2
index dea8ac6..6631124 100644
--- a/lava_helper/jinja2_templates/qemu_mps2_bl2.jinja2
+++ b/lava_helper/jinja2_templates/qemu_mps2_bl2.jinja2
@@ -1,5 +1,5 @@
 {#------------------------------------------------------------------------------
-# Copyright (c) 2019-2020, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -53,4 +53,6 @@
   platform: {{ platform }}
   build_name: {{ build_name }}
   build_job_url: {{ build_job_url }}
+  firmware_url: {{ firmware_url }}
+  bootloader_url: {{ bootloader_url }}
 
diff --git a/lava_helper/lava_create_jobs.py b/lava_helper/lava_create_jobs.py
index f922a73..ebcfc4d 100755
--- a/lava_helper/lava_create_jobs.py
+++ b/lava_helper/lava_create_jobs.py
@@ -4,7 +4,7 @@
 
 __copyright__ = """
 /*
- * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2020-2022, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
@@ -137,39 +137,16 @@
                             "cpu0_baseline": config.get("cpu0_baseline", 0),
                             "cpu0_initvtor_s": config.get("cpu0_initvtor_s", "0x10000000")
                         }
-                        params.update(
-                            {
-                                "firmware_url": get_artifact_url(
-                                    artifact_store_url,
-                                    params,
-                                    test_dict.get("binaries").get("firmware"),
-                                ),
-                                "tarball_url": get_artifact_url(
-                                    artifact_store_url,
-                                    params,
-                                    test_dict.get("binaries").get("tarball"),
-                                ),
-                                "spe_url": get_artifact_url(
-                                    artifact_store_url,
-                                    params,
-                                    test_dict.get("binaries").get("spe_image"),
-                                ),
-                                "nspe_url": get_artifact_url(
-                                    artifact_store_url,
-                                    params,
-                                    test_dict.get("binaries").get("nspe_image"),
-                                ),
-                            }
-                        )
-                        params.update(
-                            {
-                                "bootloader_url": get_artifact_url(
-                                    artifact_store_url,
-                                    params,
-                                    test_dict.get("binaries").get("bootloader"),
-                                ),
-                            }
-                        )
+                        for binary_type, binary_name in config["binaries"].items():
+                            params.update(
+                                {
+                                    "{}_url".format(binary_type): get_artifact_url(
+                                        artifact_store_url,
+                                        params,
+                                        binary_name
+                                    )
+                                }
+                            )
                         params.update(
                             {
                                 "job_name": get_job_name(
diff --git a/lava_helper/lava_helper_configs.py b/lava_helper/lava_helper_configs.py
index d949fba..1f93a2e 100644
--- a/lava_helper/lava_helper_configs.py
+++ b/lava_helper/lava_helper_configs.py
@@ -109,12 +109,12 @@
     "compilers": ["GNUARM", "ARMCLANG"],
     "build_types": ["Debug", "Release", "Minsizerel"],
     "boot_types": ["BL2"],
+    "binaries": {
+        "firmware": "tfm_s_ns_signed.bin",
+        "bootloader": "bl2.bin"
+    },
     "tests": {
         'Default': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -126,10 +126,6 @@
             ]
         },  # Default
         'DefaultProfileS': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -141,10 +137,6 @@
             ]
         },  # DefaultProfileS
         'DefaultProfileM': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -156,10 +148,6 @@
             ]
         },  # DefaultProfileM
         'DefaultProfileL': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -172,10 +160,6 @@
         },  # DefaultProfileL
 
         'Regression': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -199,10 +183,6 @@
         },  # Regression
 
         'RegressionProfileM': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -225,10 +205,6 @@
             ]  # Monitors
         },  # RegressionProfileM
         'RegressionProfileS': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -251,10 +227,6 @@
             ]  # Monitors
         },  # RegressionProfileS
         'RegressionProfileL': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -278,10 +250,6 @@
         },  # RegressionProfileL
 
         'RegressionIPC': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -304,10 +272,6 @@
             ]  # Monitors
         },  # Regression
         'RegressionIPCTfmLevel2': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -330,10 +294,6 @@
             ]  # Monitors
         },  # Regression
         'RegressionIPCTfmLevel3': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -356,10 +316,6 @@
             ]  # Monitors
         },  # Regression
         'CoreIPC': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -371,10 +327,6 @@
             ]
         },  # CoreIPC
         'CoreIPCTfmLevel2': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -386,10 +338,6 @@
             ]
         },  # CoreIPCTfmLevel2
         'CoreIPCTfmLevel3': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -402,42 +350,22 @@
         },  # CoreIPCTfmLevel3
 
         'PsaApiTest_Crypto': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": monitors_psaapitest_crypto_workaround,
         }, # PsaApiTest_Crypto
 
         'PsaApiTest_STORAGE': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": monitors_psaapitest_by_desc,
         }, # PsaApiTest_Storage
 
         'PsaApiTestIPC_STORAGE': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": monitors_psaapitest_by_desc,
         }, # PsaApiTestIPC_Storage
 
         'PsaApiTest_Attest': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": monitors_psaapitest_by_ut,
         }, # PsaApiTest_Attest
 
         'PsaApiTestIPC_Attest': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": monitors_psaapitest_by_ut,
         }, # PsaApiTestIPC_Attest
 
@@ -446,8 +374,8 @@
 
 
 # FVP with BL2 bootloader
-# firmware <-> ns <-> application: --application cpu0=bl2.axf
-# bootloader <-> s <-> data: --data cpu0=tfm_s_ns_signed.bin@0x10080000
+# application: --application cpu0=bl2.axf
+# data: --data cpu0=tfm_s_ns_signed.bin@0x10080000
 fvp_mps2_an521_bl2 = {
     "templ": "fvp_mps2.jinja2",
     "job_name": "fvp_mps2_an521_bl2",
@@ -461,12 +389,12 @@
     "build_types": ["Debug", "Release", "Minsizerel"],
     "boot_types": ["BL2"],
     "data_bin_offset": "0x10080000",
+    "binaries": {
+        "application": "bl2.axf",
+        "data": "tfm_s_ns_signed.bin"
+    },
     "tests": {
         'Default': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -478,10 +406,6 @@
             ]
         },  # Default
         'DefaultProfileS': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -493,10 +417,6 @@
             ]
         },  # DefaultProfileS
         'DefaultProfileM': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -508,10 +428,6 @@
             ]
         },  # DefaultProfileM
         'DefaultProfileL': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -524,10 +440,6 @@
         },  # DefaultProfileL
 
         'Regression': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -551,10 +463,6 @@
         },  # Regression
 
         'RegressionProfileM': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -577,10 +485,6 @@
             ]  # Monitors
         },  # RegressionProfileM
         'RegressionProfileS': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -603,10 +507,6 @@
             ]  # Monitors
         },  # RegressionProfileS
         'RegressionProfileL': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -630,10 +530,6 @@
         },  # RegressionProfileL
 
         'RegressionIPC': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -656,10 +552,6 @@
             ]  # Monitors
         },  # Regression
         'RegressionIPCTfmLevel2': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -682,10 +574,6 @@
             ]  # Monitors
         },  # Regression
         'RegressionIPCTfmLevel3': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -708,10 +596,6 @@
             ]  # Monitors
         },  # Regression
         'CoreIPC': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -723,10 +607,6 @@
             ]
         },  # CoreIPC
         'CoreIPCTfmLevel2': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -738,10 +618,6 @@
             ]
         },  # CoreIPCTfmLevel2
         'CoreIPCTfmLevel3': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -754,42 +630,22 @@
         },  # CoreIPCTfmLevel3
 
         'PsaApiTest_Crypto': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": monitors_psaapitest_crypto_workaround,
         }, # PsaApiTest_Crypto
 
         'PsaApiTest_STORAGE': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": monitors_psaapitest_by_desc,
         }, # PsaApiTest_Storage
 
         'PsaApiTestIPC_STORAGE': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": monitors_psaapitest_by_desc,
         }, # PsaApiTestIPC_Storage
 
         'PsaApiTest_Attest': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": monitors_psaapitest_by_ut,
         }, # PsaApiTest_Attest
 
         'PsaApiTestIPC_Attest': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": monitors_psaapitest_by_ut,
         }, # PsaApiTestIPC_Attest
 
@@ -798,8 +654,8 @@
 
 
 # FVP without BL2 bootloader
-# firmware <-> ns <-> application: --application cpu0=tfm_s.axf
-# bootloader <-> s <-> data: --data cpu0=tfm_ns.bin@0x00100000
+# application: --application cpu0=tfm_s.axf
+# data: --data cpu0=tfm_ns.bin@0x00100000
 fvp_mps2_an521_nobl2 = {
     "templ": "fvp_mps2.jinja2",
     "job_name": "fvp_mps2_an521_nobl2",
@@ -814,12 +670,12 @@
     "boot_types": ["NOBL2"],
     "data_bin_offset": "0x00100000",
     "cpu_baseline": 1,
+    "binaries": {
+        "application": "tfm_s.axf",
+        "data": "tfm_ns.bin"
+    },
     "tests": {
         'Default': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -831,10 +687,6 @@
             ]
         },  # Default
         'DefaultProfileS': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -846,10 +698,6 @@
             ]
         },  # DefaultProfileS
         'DefaultProfileM': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -861,10 +709,6 @@
             ]
         },  # DefaultProfileM
         'DefaultProfileL': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -877,10 +721,6 @@
         },  # DefaultProfileL
 
         'Regression': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -903,10 +743,6 @@
             ]  # Monitors
         },  # Regression
         'RegressionProfileM': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -929,10 +765,6 @@
             ]  # Monitors
         },  # RegressionProfileM
         'RegressionProfileS': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -955,10 +787,6 @@
             ]  # Monitors
         },  # RegressionProfileS
         'RegressionProfileL': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -982,10 +810,6 @@
         },  # RegressionProfileL
 
         'RegressionIPC': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1008,10 +832,6 @@
             ]  # Monitors
         },  # RegressionIPC
         'RegressionIPCTfmLevel2': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1034,10 +854,6 @@
             ]  # Monitors
         },  # RegressionIPCTfmLevel2
         'RegressionIPCTfmLevel3': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1060,10 +876,6 @@
             ]  # Monitors
         },  # RegressionIPCTfmLevel3
         'CoreIPC': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1075,10 +887,6 @@
             ]
         },  # CoreIPC
         'CoreIPCTfmLevel2': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1090,10 +898,6 @@
             ]
         },  # CoreIPCTfmLevel2
         'CoreIPCTfmLevel3': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1109,8 +913,8 @@
 
 
 # FVP with BL2 bootloader
-# firmware <-> ns <-> application: --application cpu0=bl2.axf
-# bootloader <-> s <-> data: --data cpu0=tfm_s_ns_signed.bin@0x10080000
+# application: --application cpu0=bl2.axf
+# data: --data cpu0=tfm_s_ns_signed.bin@0x10080000
 fvp_mps2_an519_bl2 = {
     "templ": "fvp_mps2.jinja2",
     "job_name": "fvp_mps2_an519_bl2",
@@ -1125,12 +929,12 @@
     "boot_types": ["BL2"],
     "data_bin_offset": "0x10080000",
     "cpu0_baseline": 1,
+    "binaries": {
+        "application": "bl2.axf",
+        "data": "tfm_s_ns_signed.bin"
+    },
     "tests": {
         'Default': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1142,10 +946,6 @@
             ]
         },  # Default
         'DefaultProfileS': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1157,10 +957,6 @@
             ]
         },  # DefaultProfileS
         'DefaultProfileM': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1173,10 +969,6 @@
         },  # DefaultProfileM
 
         'Regression': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1200,10 +992,6 @@
         },  # Regression
 
         'RegressionProfileM': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1226,10 +1014,6 @@
             ]  # Monitors
         },  # RegressionProfileM
         'RegressionProfileS': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1253,10 +1037,6 @@
         },  # RegressionProfileS
 
         'RegressionIPC': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1279,10 +1059,6 @@
             ]  # Monitors
         },  # Regression
         'RegressionIPCTfmLevel2': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1305,10 +1081,6 @@
             ]  # Monitors
         },  # Regression
         'CoreIPC': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1320,10 +1092,6 @@
             ]
         },  # CoreIPC
         'CoreIPCTfmLevel2': {
-            "binaries": {
-                "firmware": "bl2.axf",
-                "bootloader": "tfm_s_ns_signed.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1339,8 +1107,8 @@
 
 
 # FVP without BL2 bootloader
-# firmware <-> ns <-> application: --application cpu0=tfm_s.axf
-# bootloader <-> s <-> data: --data cpu0=tfm_ns.bin@0x00100000
+# application: --application cpu0=tfm_s.axf
+# data: --data cpu0=tfm_ns.bin@0x00100000
 fvp_mps2_an519_nobl2 = {
     "templ": "fvp_mps2.jinja2",
     "job_name": "fvp_mps2_an519_nobl2",
@@ -1355,12 +1123,12 @@
     "boot_types": ["NOBL2"],
     "data_bin_offset": "0x00100000",
     "cpu0_baseline": 1,
+    "binaries": {
+        "application": "tfm_s.axf",
+        "data": "tfm_ns.bin"
+    },
     "tests": {
         'Default': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1372,10 +1140,6 @@
             ]
         },  # Default
         'DefaultProfileS': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1387,10 +1151,6 @@
             ]
         },  # DefaultProfileS
         'DefaultProfileM': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1403,10 +1163,6 @@
         },  # DefaultProfileM
 
         'Regression': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1429,10 +1185,6 @@
             ]  # Monitors
         },  # Regression
         'RegressionProfileM': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1455,10 +1207,6 @@
             ]  # Monitors
         },  # RegressionProfileM
         'RegressionProfileS': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1482,10 +1230,6 @@
         },  # RegressionProfileS
 
         'RegressionIPC': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1508,10 +1252,6 @@
             ]  # Monitors
         },  # RegressionIPC
         'RegressionIPCTfmLevel2': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1534,10 +1274,6 @@
             ]  # Monitors
         },  # RegressionIPCTfmLevel2
         'CoreIPC': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1549,10 +1285,6 @@
             ]
         },  # CoreIPC
         'CoreIPCTfmLevel2': {
-            "binaries": {
-                "firmware": "tfm_s.axf",
-                "bootloader": "tfm_ns.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1583,12 +1315,12 @@
     "compilers": ["GNUARM", "ARMCLANG"],
     "build_types": ["Debug", "Release"],
     "boot_types": ["BL2"],
+    "binaries": {
+        "firmware": "tfm_s_ns_signed.bin",
+        "bootloader": "bl2.bin"
+    },
     "tests": {
         # 'Default': {
-        #     "binaries": {
-        #         "firmware": "tfm_s_ns_signed.bin",
-        #         "bootloader": "bl2.bin"
-        #     },
         #     "monitors": [
         #         {
         #             'name': 'Secure_Test_Suites_Summary',
@@ -1602,10 +1334,6 @@
         #     ]
         # },  # Default
         # 'DefaultProfileS': {
-        #     "binaries": {
-        #         "firmware": "tfm_s_ns_signed.bin",
-        #         "bootloader": "bl2.bin"
-        #     },
         #     "monitors": [
         #         {
         #             'name': 'Secure_Test_Suites_Summary',
@@ -1619,10 +1347,6 @@
         #     ]
         # },  # DefaultProfileS
         # 'DefaultProfileM': {
-        #     "binaries": {
-        #         "firmware": "tfm_s_ns_signed.bin",
-        #         "bootloader": "bl2.bin"
-        #     },
         #     "monitors": [
         #         {
         #             'name': 'Secure_Test_Suites_Summary',
@@ -1636,10 +1360,6 @@
         #     ]
         # },  # DefaultProfileM
         'Regression': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1662,10 +1382,6 @@
             ]  # Monitors
         },  # Regression
         'RegressionProfileS': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1688,10 +1404,6 @@
             ]  # Monitors
         },  # RegressionProfileS
         'RegressionIPC': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1714,10 +1426,6 @@
             ]  # Monitors
         },  # Regression
         'RegressionIPCTfmLevel2': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1740,10 +1448,6 @@
             ]  # Monitors
         },  # Regression
         'RegressionIPCTfmLevel3': {
-            "binaries": {
-                "firmware": "tfm_s_ns_signed.bin",
-                "bootloader": "bl2.bin"
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1766,10 +1470,6 @@
             ]  # Monitors
         },  # Regression
         # 'CoreIPC': {
-        #     "binaries": {
-        #         "firmware": "tfm_s_ns_signed.bin",
-        #         "bootloader": "bl2.bin"
-        #     },
         #     "monitors": [
         #         {
         #             'name': 'Secure_Test_Suites_Summary',
@@ -1783,10 +1483,6 @@
         #     ]
         # },  # CoreIPC
         # 'CoreIPCTfmLevel2': {
-        #     "binaries": {
-        #         "firmware": "tfm_s_ns_signed.bin",
-        #         "bootloader": "bl2.bin"
-        #     },
         #     "monitors": [
         #         {
         #             'name': 'Secure_Test_Suites_Summary',
@@ -1800,10 +1496,6 @@
         #     ]
         # },  # CoreIPCTfmLevel2
         # 'CoreIPCTfmLevel3': {
-        #     "binaries": {
-        #         "firmware": "tfm_s_ns_signed.bin",
-        #         "bootloader": "bl2.bin"
-        #     },
         #     "monitors": [
         #         {
         #             'name': 'Secure_Test_Suites_Summary',
@@ -1835,11 +1527,11 @@
     "compilers": ["GNUARM", "ARMCLANG"],
     "build_types": ["Debug", "Release", "Minsizerel"],
     "boot_types": ["BL2"],
+    "binaries": {
+        "firmware": "tfm.hex",
+    },
     "tests": {
         "Default": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1851,9 +1543,6 @@
             ]  # Monitors
         },
         "CoreIPC": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1865,9 +1554,6 @@
             ]  # Monitors
         },
         "CoreIPCTfmLevel2": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1879,9 +1565,6 @@
             ]  # Monitors
         },
         "CoreIPCTfmLevel3": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1893,9 +1576,6 @@
             ]  # Monitors
         },
         "DefaultProfileM": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1907,9 +1587,6 @@
             ]  # Monitors
         },
         "DefaultProfileS": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1921,9 +1598,6 @@
             ]  # Monitors
         },
         "Regression": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1946,9 +1620,6 @@
             ]  # Monitors
         },
         "RegressionIPC": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1971,9 +1642,6 @@
             ]  # Monitors
         },
         "RegressionIPCTfmLevel2": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -1996,9 +1664,6 @@
             ]  # Monitors
         },
         "RegressionIPCTfmLevel3": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2021,9 +1686,6 @@
             ]  # Monitors
         },
         "RegressionProfileM": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2046,9 +1708,6 @@
             ]  # Monitors
         },
         "RegressionProfileS": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2088,11 +1747,11 @@
     "compilers": ["GNUARM"],
     "build_types": ["Debug"],
     "boot_types": ["BL2"],
+    "binaries": {
+        "firmware": "tfm.hex",
+    },
     "tests": {
         "RegressionIPCTfmLevel3": {
-            "binaries": {
-                "firmware": "tfm.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2130,11 +1789,11 @@
     "compilers": ["GNUARM", "ARMCLANG"],
     "build_types": ["Release", "Minsizerel"],
     "boot_types": ["BL2"],
+    "binaries": {
+        "tarball": "stm32l562e-dk-tfm.tar.bz2",
+    },
     "tests": {
         "Regression": {
-            "binaries": {
-                "tarball": "stm32l562e-dk-tfm.tar.bz2",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2157,9 +1816,6 @@
             ]  # Monitors
         },
         "RegressionIPC": {
-            "binaries": {
-                "tarball": "stm32l562e-dk-tfm.tar.bz2",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2182,9 +1838,6 @@
             ]  # Monitors
         },
         "RegressionIPCTfmLevel2": {
-            "binaries": {
-                "tarball": "stm32l562e-dk-tfm.tar.bz2",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2207,9 +1860,6 @@
             ]  # Monitors
         },
         "RegressionIPCTfmLevel3": {
-            "binaries": {
-                "tarball": "stm32l562e-dk-tfm.tar.bz2",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2247,11 +1897,11 @@
     "compilers": ["GNUARM"],
     "build_types": ["Relwithdebinfo"],
     "boot_types": ["NOBL2"],
+    "binaries": {
+        "tarball": "lpcxpresso55s69-tfm.tar.bz2",
+    },
     "tests": {
         "DefaultProfileM": {
-            "binaries": {
-                "tarball": "lpcxpresso55s69-tfm.tar.bz2",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2263,9 +1913,6 @@
             ]  # Monitors
         },
         "RegressionProfileM": {
-            "binaries": {
-                "tarball": "lpcxpresso55s69-tfm.tar.bz2",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2303,12 +1950,12 @@
     "compilers": ["GNUARM", "ARMCLANG"],
     "build_types": ["Release", "Minsizerel"],
     "boot_types": ["NOBL2"],
+    "binaries": {
+        "spe": "tfm_s_signed.hex",
+        "nspe": "tfm_ns_signed.hex",
+    },
     "tests": {
         "Regression": {
-            "binaries": {
-                "spe_image": "tfm_s_signed.hex",
-                "nspe_image": "tfm_ns_signed.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2331,10 +1978,6 @@
             ]  # Monitors
         },
         "RegressionIPC": {
-            "binaries": {
-                "spe_image": "tfm_s_signed.hex",
-                "nspe_image": "tfm_ns_signed.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2357,10 +2000,6 @@
             ]  # Monitors
         },
         "RegressionIPCTfmLevel2": {
-            "binaries": {
-                "spe_image": "tfm_s_signed.hex",
-                "nspe_image": "tfm_ns_signed.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',
@@ -2383,10 +2022,6 @@
             ]  # Monitors
         },
         "RegressionIPCTfmLevel3": {
-            "binaries": {
-                "spe_image": "tfm_s_signed.hex",
-                "nspe_image": "tfm_ns_signed.hex",
-            },
             "monitors": [
                 {
                     'name': 'Secure_Test_Suites_Summary',