LAVA: Deprecate redundant codes in LAVA helper

LAVA monitor only relies on bl2, regression tests and psa arch tests.
This patch updates the LAVA helper logics to select LAVA monitor in a
much easier way, instead of looping all build params.

Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: Ic00ce2ac308dcf4bd502212bb4e56234576b430f
diff --git a/jenkins/ci.jpl b/jenkins/ci.jpl
index 0d86f03..9d4a434 100644
--- a/jenkins/ci.jpl
+++ b/jenkins/ci.jpl
@@ -12,80 +12,6 @@
 
 failure_states = ["FAILURE", "ABORTED", "UNSTABLE", "NOT_BUILT"]
 
-mapPlatform = ["cypress/psoc64":                "psoc64",
-               "arm/mps2/an519":                "AN519",
-               "arm/mps2/an521":                "AN521",
-               "arm/mps3/an524":                "AN524",
-               "arm/mps3/an547":                "AN547",
-               "arm/mps3/an552":                "AN552",
-               "arm/mps3/corstone310_fvp":      "corstone310",
-               "arm/musca_b1":                  "MUSCA_B1",
-               "arm/musca_s1":                  "MUSCA_S1",
-               "arm/rss":                       "RSS",
-               "stm/stm32l562e_dk":             "stm32l562e_dk",
-               "arm/corstone1000":              "corstone1000",
-               "nxp/lpcxpresso55s69":           "lpcxpresso55s69"]
-
-mapBL2 = ["True":  "--bl2",
-          "False": ""]
-
-mapTestPsaApi = ["OFF":                      "",
-                 "STORAGE":                  "STORAGE",
-                 "CRYPTO":                   "Crypto",
-                 "INITIAL_ATTESTATION":      "Attest",
-                 "IPC":                      "FF"]
-
-// LIB_MODEL, ISOLATION_LEVEL, TEST_REG, TEST_PSA_API, PROFILE, CONFIG_NAME
-mapConfigs = [
-  ["True",  "1", "False", "OFF",                      "N.A",            "Default"],
-  ["False", "1", "False", "OFF",                      "N.A",            "CoreIPC"],
-  ["False", "2", "False", "OFF",                      "N.A",            "CoreIPCTfmLevel2"],
-  ["False", "3", "False", "OFF",                      "N.A",            "CoreIPCTfmLevel3"],
-  ["True",  "1", "False", "OFF",                      "profile_small",  "DefaultProfileS"],
-  ["False", "2", "False", "OFF",                      "profile_medium", "DefaultProfileM"],
-  ["False", "3", "False", "OFF",                      "profile_large",  "DefaultProfileL"],
-  ["True",  "1", "True",  "OFF",                      "N.A",            "Regression"],
-  ["False", "1", "True",  "OFF",                      "N.A",            "RegressionIPC"],
-  ["False", "2", "True",  "OFF",                      "N.A",            "RegressionIPCTfmLevel2"],
-  ["False", "3", "True",  "OFF",                      "N.A",            "RegressionIPCTfmLevel3"],
-  ["True",  "1", "True",  "OFF",                      "profile_small",  "RegressionProfileS"],
-  ["False", "2", "True",  "OFF",                      "profile_medium", "RegressionProfileM"],
-  ["False", "3", "True",  "OFF",                      "profile_large",  "RegressionProfileL"],
-  ["True",  "1", "False", "STORAGE",                  "N.A",            "PsaApiTest (STORAGE)"],
-  ["True",  "1", "False", "CRYPTO",                   "N.A",            "PsaApiTest (Crypto)"],
-  ["True",  "1", "False", "INITIAL_ATTESTATION",      "N.A",            "PsaApiTest (Attest)"],
-  ["True",  "1", "False", "IPC",                      "N.A",            "PsaApiTest (FF)"],
-  ["False", "1", "False", "STORAGE",                  "N.A",            "PsaApiTestIPC (STORAGE)"],
-  ["False", "1", "False", "CRYPTO",                   "N.A",            "PsaApiTestIPC (Crypto)"],
-  ["False", "1", "False", "INITIAL_ATTESTATION",      "N.A",            "PsaApiTestIPC (Attest)"],
-  ["False", "1", "False", "IPC",                      "N.A",            "PsaApiTestIPC (FF)"],
-  ["False", "2", "False", "STORAGE",                  "N.A",            "PsaApiTestIPCTfmLevel2 (STORAGE)"],
-  ["False", "2", "False", "CRYPTO",                   "N.A",            "PsaApiTestIPCTfmLevel2 (Crypto)"],
-  ["False", "2", "False", "INITIAL_ATTESTATION",      "N.A",            "PsaApiTestIPCTfmLevel2 (Attest)"],
-  ["False", "2", "False", "IPC",                      "N.A",            "PsaApiTestIPCTfmLevel2 (FF)"],
-  ["False", "3", "False", "STORAGE",                  "N.A",            "PsaApiTestIPCTfmLevel3 (STORAGE)"],
-  ["False", "3", "False", "CRYPTO",                   "N.A",            "PsaApiTestIPCTfmLevel3 (Crypto)"],
-  ["False", "3", "False", "INITIAL_ATTESTATION",      "N.A",            "PsaApiTestIPCTfmLevel3 (Attest)"],
-  ["False", "3", "False", "IPC",                      "N.A",            "PsaApiTestIPCTfmLevel3 (FF)"],
-]
-
-cfgs = ["Default", "CoreIPC", "CoreIPCTfmLevel2", "CoreIPCTfmLevel3",
-        "Regression", "RegressionIPC",
-        "RegressionIPCTfmLevel2", "RegressionIPCTfmLevel3",
-        "DefaultProfileS", "RegressionProfileS",
-        "DefaultProfileM", "RegressionProfileM", "RegressionProfileM PSOFF",
-        "DefaultProfileL", "RegressionProfileL",
-        "PsaApiTest (Attest)", "PsaApiTestIPC (Attest)",
-        "PsaApiTestIPCTfmLevel2 (Attest)",
-        "PsaApiTest (Crypto)", "PsaApiTestIPC (Crypto)",
-        "PsaApiTestIPCTfmLevel2 (Crypto)",
-        "PsaApiTest (STORAGE)", "PsaApiTestIPC (STORAGE)",
-        "PsaApiTestIPCTfmLevel2 (STORAGE)",
-        "PsaApiTestIPC (FF)",
-        "PsaApiTestIPCTfmLevel2 (FF)",
-        "PsaApiTestIPCTfmLevel3 (STORAGE)", "PsaApiTestIPCTfmLevel3 (Crypto)",
-        "PsaApiTestIPCTfmLevel3 (Attest)", "PsaApiTestIPCTfmLevel3 (FF)"]
-
 cfgSkipFVP = [
   "AN519_GCC_IPC_2_REG_Debug_BL2",
   "AN519_GCC_IPC_2_REG_Debug_BL2_MEDIUM",
@@ -97,42 +23,8 @@
   "AN521_ARMCLANG_IPC_2_REG_Debug_BL2_MEDIUM",
 ]
 
-@NonCPS
-def generateLavaParam(build_params) {
-  def params = []
-  params += string(name: "TARGET_PLATFORM", \
-                   value: mapPlatform[build_params["TFM_PLATFORM"]])
-  params += string(name: "COMPILER", \
-                   value: build_params["COMPILER"].split('_')[0])
-  params += string(name: "PSA_API_SUITE", \
-                   value: mapTestPsaApi[build_params["TEST_PSA_API"]])
-
-  configName = "Config"
-  config_params = [build_params["LIB_MODEL"], build_params["ISOLATION_LEVEL"], \
-                   build_params["TEST_REGRESSION"], build_params["TEST_PSA_API"], \
-                   build_params["PROFILE"]]
-  // Regression Test is enabled if CRYPTO is ON
-  if (build_params["EXTRA_PARAMS"] == "CRYPTO_ON") {
-    config_params[2] = "True"
-  }
-  for (config in mapConfigs) {
-    if (config_params == config[0..4]) {
-      configName += config[5].replace(' (', '_').replace(')', '')
-      break
-    }
-  }
-  if (configName == "Config") {
-    configName = "ConfigDefault"
-  }
-  params += string(name: "PROJ_CONFIG", value: configName)
-  print("Params of ${configName} :")
-  print(config_params)
-  return params
-}
-
 def submit_lava_tests(config, results, build_res, params, params_collection) {
   print("Doing LAVA stuff for ${build_res.getAbsoluteUrl()}")
-  params += generateLavaParam(params_collection)
   params += string(name: 'BUILD_NUMBER', value: "${build_res.number}")
   params += string(name: 'BUILD_URL', value: build_res.getAbsoluteUrl())
   params += string(name: 'LAVA_URL', value: env.LAVA_URL)
@@ -237,28 +129,9 @@
         if (env.JOB_NAME.equals("tf-m-extra-build")) {
           print("LAVA is not needed in tf-m-extra-build job.")
         }
-        // Submit test job for NXP LPCXpresso55S69 & Cypress PSoC64
-        else if (params_collection["TFM_PLATFORM"].contains("lpcxpresso55s69") || params_collection["TFM_PLATFORM"].contains("psoc64")) {
+        // Submit LAVA tests
+        else {
           submit_lava_tests(config, results, build_res, params, params_collection)
-        } else {
-            // Configs without BL2 do not need LAVA tests
-            if (params_collection["BL2"] == "False") {
-              print("LAVA is not needed for ${build_url}")
-            }
-            // LAVA tests on MUSCA_B1 are not needed in per-patch job
-            else if (params_collection["TFM_PLATFORM"].contains("musca_b1") && \
-                     env.JOB_NAME.equals("tf-m-build-and-test")) {
-              print("LAVA is not needed for ${build_url}")
-            }
-            // LAVA tests on Corstone1000 FPGA config is not supported
-            else if (params_collection["TFM_PLATFORM"].contains("corstone1000") && \
-                     params_collection["EXTRA_PARAMS"].contains("FPGA")) {
-              print("LAVA is not needed for ${build_url}")
-            }
-            // Submit LAVA tests
-            else {
-              submit_lava_tests(config, results, build_res, params, params_collection)
-            }
         }
     }
   }
diff --git a/jenkins/lava-submit.jpl b/jenkins/lava-submit.jpl
index c403bab..dfc02c5 100644
--- a/jenkins/lava-submit.jpl
+++ b/jenkins/lava-submit.jpl
@@ -40,13 +40,11 @@
   return device_type
 }
 
-def submitJobs(device_type, bl2_string, psa_string) {
+def submitJobs(device_type) {
   dir("tf-m-ci-scripts") {
     def res = sh(script: """./lava_helper/lava_create_jobs.py \
-      --build-number ${env.BUILD_NUMBER} --output-dir lava_jobs ${device_type}\
-      --compiler ${env.COMPILER} --platform ${env.TARGET_PLATFORM} \
-      ${bl2_string} ${psa_string} --build-type ${env.CMAKE_BUILD_TYPE} \
-      --jenkins-build-url ${env.BUILD_URL} --proj-config ${env.PROJ_CONFIG} \
+      --output-dir lava_jobs ${device_type} \
+      --jenkins-build-url ${env.BUILD_URL} \
       --docker-prefix ${env.DOCKER_PREFIX} --license-variable "${env.LICENSE_VARIABLE}" \
       --enable-code-coverage "${env.CODE_COVERAGE_EN}"
       """, returnStdout: true).trim()
@@ -77,21 +75,12 @@
 
       withCredentials([usernamePassword(credentialsId: env.LAVA_CREDENTIALS, passwordVariable: 'LAVA_TOKEN', usernameVariable: 'LAVA_USER')]) {
         print("Generating LAVA jobs...")
-        def bl2_string = ""
-        def psa_string = ""
-        if (env.BL2.equals("True")) {
-          bl2_string = "--bl2"
-        }
-        // work around this string containing quotes?
-        if (env.PSA_API_SUITE != "") {
-          psa_string = "--psa-api-suite ${env.PSA_API_SUITE}"
-        }
         try {
-          submitJobs(device_type, bl2_string, psa_string)
+          submitJobs(device_type)
         } catch (Exception ex) {
           print("LAVA-Submit failed! Exception: ${ex}")
           print("Try to submit again...")
-          submitJobs(device_type, bl2_string, psa_string)
+          submitJobs(device_type)
           currentBuild.setDescription(currentBuild.getDescription() + " Submitted twice!")
         }
       }
diff --git a/lava_helper/jinja2_templates/base.jinja2 b/lava_helper/jinja2_templates/base.jinja2
index 8e88e35..6bb5039 100644
--- a/lava_helper/jinja2_templates/base.jinja2
+++ b/lava_helper/jinja2_templates/base.jinja2
@@ -7,9 +7,6 @@
 {%- block metadata %}
 metadata:
   build_no: {{ build_no }}
-  compiler: {{ compiler }}
-  build_type: {{ build_type }}
-  boot_type: {{ boot_type }}
   name: {{ name }}
   platform: {{ platform }}
   build_name: {{ build_name }}
diff --git a/lava_helper/jinja2_templates/fvp_corstone1000.jinja2 b/lava_helper/jinja2_templates/fvp_corstone1000.jinja2
index 3eebf42..a2ec56d 100644
--- a/lava_helper/jinja2_templates/fvp_corstone1000.jinja2
+++ b/lava_helper/jinja2_templates/fvp_corstone1000.jinja2
@@ -61,7 +61,7 @@
 - test:
     namespace: target
     monitors:
-    {%- for monitor in test.monitors %}
+    {%- for monitor in monitors %}
     - name: "{{monitor.name}}"
       start: "{{monitor.start}}"
       end: "{{monitor.end}}"
diff --git a/lava_helper/jinja2_templates/fvp_mps2.jinja2 b/lava_helper/jinja2_templates/fvp_mps2.jinja2
index 243e58e..7ca4625 100644
--- a/lava_helper/jinja2_templates/fvp_mps2.jinja2
+++ b/lava_helper/jinja2_templates/fvp_mps2.jinja2
@@ -44,7 +44,7 @@
     image: /opt/model/FVP_MPS2_AEMv8M/models/Linux64_GCC-6.4/FVP_MPS2_AEMv8M
     timeout:
       minutes: 10
-{%- if psa_api_suite == "FF" %}
+{%- if psa_api_suite == "IPC" %}
     console_string: 'telnetterminal2: Listening for serial connection on port (?P<PORT>\d+)'
     use_telnet: True
 {%- else %}
@@ -82,7 +82,7 @@
 - test:
     namespace: target
     monitors:
-    {%- for monitor in test.monitors %}
+    {%- for monitor in monitors %}
     - name: "{{monitor.name}}"
       start: "{{monitor.start}}"
       end: "{{monitor.end}}"
@@ -93,7 +93,9 @@
          {%- if monitor.fixup.skip %}
          '{{monitor.fixup.skip}}': skip
          {%- endif %}
-         'SIM ERROR': fail
+         {%- if monitor.fixup.sim_error %}
+         '{{monitor.fixup.sim_error}}': fail
+         {%- endif %}
     {%- endfor %}
 
 {%- if enable_code_coverage %}
diff --git a/lava_helper/jinja2_templates/fvp_mps3.jinja2 b/lava_helper/jinja2_templates/fvp_mps3.jinja2
index f02063f..744d84c 100644
--- a/lava_helper/jinja2_templates/fvp_mps3.jinja2
+++ b/lava_helper/jinja2_templates/fvp_mps3.jinja2
@@ -72,7 +72,7 @@
 - test:
     namespace: target
     monitors:
-    {%- for monitor in test.monitors %}
+    {%- for monitor in monitors %}
     - name: "{{monitor.name}}"
       start: "{{monitor.start}}"
       end: "{{monitor.end}}"
diff --git a/lava_helper/jinja2_templates/lpcxpresso55s69.jinja2 b/lava_helper/jinja2_templates/lpcxpresso55s69.jinja2
index 5de0d9b..f95c437 100644
--- a/lava_helper/jinja2_templates/lpcxpresso55s69.jinja2
+++ b/lava_helper/jinja2_templates/lpcxpresso55s69.jinja2
@@ -20,7 +20,7 @@
 
     - test:
         monitors:
-        {%- for monitor in test.monitors %}
+        {%- for monitor in monitors %}
         - name: "{{monitor.name}}"
           start: "{{monitor.start}}"
           end: "{{monitor.end}}"
@@ -37,9 +37,6 @@
 {% block metadata %}
 metadata:
   build_no: {{ build_no }}
-  compiler: {{ compiler }}
-  build_type: {{ build_type }}
-  boot_type: {{ boot_type }}
   name: {{ name }}
   platform: {{ platform }}
   build_name: {{ build_name }}
diff --git a/lava_helper/jinja2_templates/mps2.jinja2 b/lava_helper/jinja2_templates/mps2.jinja2
index c1a726c..2df0641 100644
--- a/lava_helper/jinja2_templates/mps2.jinja2
+++ b/lava_helper/jinja2_templates/mps2.jinja2
@@ -36,7 +36,7 @@
 - test:
     namespace: target
     monitors:
-    {%- for monitor in test.monitors %}
+    {%- for monitor in monitors %}
     - name: "{{monitor.name}}"
       start: "{{monitor.start}}"
       end: "{{monitor.end}}"
@@ -47,5 +47,5 @@
          {%- if monitor.fixup.skip %}
          '{{monitor.fixup.skip}}': skip
          {%- endif %}
-    {% endfor %}
+    {%- endfor %}
 {% endblock %}
diff --git a/lava_helper/jinja2_templates/musca_b1.jinja2 b/lava_helper/jinja2_templates/musca_b1.jinja2
index 5233e95..7bc2d88 100644
--- a/lava_helper/jinja2_templates/musca_b1.jinja2
+++ b/lava_helper/jinja2_templates/musca_b1.jinja2
@@ -20,7 +20,7 @@
 
     - test:
         monitors:
-        {%- for monitor in test.monitors %}
+        {%- for monitor in monitors %}
         - name: "{{monitor.name}}"
           start: "{{monitor.start}}"
           end: "{{monitor.end}}"
@@ -37,9 +37,6 @@
 {% block metadata %}
 metadata:
   build_no: {{ build_no }}
-  compiler: {{ compiler }}
-  build_type: {{ build_type }}
-  boot_type: {{ boot_type }}
   name: {{ name }}
   platform: {{ platform }}
   build_name: {{ build_name }}
diff --git a/lava_helper/jinja2_templates/psoc64.jinja2 b/lava_helper/jinja2_templates/psoc64.jinja2
index e89c9f0..cc40483 100644
--- a/lava_helper/jinja2_templates/psoc64.jinja2
+++ b/lava_helper/jinja2_templates/psoc64.jinja2
@@ -22,7 +22,7 @@
 
     - test:
         monitors:
-        {%- for monitor in test.monitors %}
+        {%- for monitor in monitors %}
         - name: "{{monitor.name}}"
           start: "{{monitor.start}}"
           end: "{{monitor.end}}"
@@ -36,9 +36,6 @@
 {% block metadata %}
 metadata:
   build_no: {{ build_no }}
-  compiler: {{ compiler }}
-  build_type: {{ build_type }}
-  boot_type: {{ boot_type }}
   name: {{ name }}
   platform: {{ platform }}
   build_name: {{ build_name }}
diff --git a/lava_helper/jinja2_templates/qemu_mps2_bl2.jinja2 b/lava_helper/jinja2_templates/qemu_mps2_bl2.jinja2
index 644b6c4..1cb7602 100644
--- a/lava_helper/jinja2_templates/qemu_mps2_bl2.jinja2
+++ b/lava_helper/jinja2_templates/qemu_mps2_bl2.jinja2
@@ -17,7 +17,7 @@
       minutes: 10
 - test:
     monitors:
-    {%- for monitor in test.monitors %}
+    {%- for monitor in monitors %}
     - name: "{{monitor.name}}"
       start: "{{monitor.start}}"
       end: "{{monitor.end}}"
@@ -28,7 +28,9 @@
          {%- if monitor.fixup.skip %}
          '{{monitor.fixup.skip}}': skip
          {%- endif %}
-         'SIM ERROR': fail
+         {%- if monitor.fixup.sim_error %}
+         '{{monitor.fixup.sim_error}}': fail
+         {%- endif %}
     {%- endfor %}
 
 context:
@@ -59,9 +61,6 @@
 
 metadata:
   build_no: {{ build_no }}
-  compiler: {{ compiler }}
-  build_type: {{ build_type }}
-  boot_type: {{ boot_type }}
   name: {{ name }}
   platform: {{ platform }}
   build_name: {{ build_name }}
diff --git a/lava_helper/jinja2_templates/stm32l562e_dk.jinja2 b/lava_helper/jinja2_templates/stm32l562e_dk.jinja2
index dbe9bcb..8c00dd7 100644
--- a/lava_helper/jinja2_templates/stm32l562e_dk.jinja2
+++ b/lava_helper/jinja2_templates/stm32l562e_dk.jinja2
@@ -20,7 +20,7 @@
 
     - test:
         monitors:
-        {%- for monitor in test.monitors %}
+        {%- for monitor in monitors %}
         - name: "{{monitor.name}}"
           start: "{{monitor.start}}"
           end: "{{monitor.end}}"
@@ -37,9 +37,6 @@
 {% block metadata %}
 metadata:
   build_no: {{ build_no }}
-  compiler: {{ compiler }}
-  build_type: {{ build_type }}
-  boot_type: {{ boot_type }}
   name: {{ name }}
   platform: {{ platform }}
   build_name: {{ build_name }}
diff --git a/lava_helper/jinja2_templates/test_summary_csv.jinja2 b/lava_helper/jinja2_templates/test_summary_csv.jinja2
index b7aa4ae..eeca62b 100644
--- a/lava_helper/jinja2_templates/test_summary_csv.jinja2
+++ b/lava_helper/jinja2_templates/test_summary_csv.jinja2
@@ -1,12 +1,12 @@
-LAVA_JOB_ID,LAVA_HEALTH,LAVA_DEVICE_TYPE,BUILD_FULL_NAME,BUILD_NUMBER,COMPILER,BUILD_TYPE,BOOT_TYPE,PLATFORM,RESULT_SUITE,RESULT_NAME,RESULT
+LAVA_JOB_ID,LAVA_HEALTH,LAVA_DEVICE_TYPE,BUILD_FULL_NAME,BUILD_NUMBER,PLATFORM,RESULT_SUITE,RESULT_NAME,RESULT
 {%- for job in jobs %}
 {%- for job_id, data in job.items() -%}
 {%- if data[1] %}
 {%- for result in data[1] %}
-{{ job_id }},{{ data[0]['health']}},{{ data[0]['device_type']}},{{ data[0]['metadata']['build_name'] }},{{ data[0]['metadata']['build_no'] }},{{ data[0]['metadata']['compiler'] }},{{ data[0]['metadata']['build_type'] }},{{ data[0]['metadata']['boot_type'] }},{{ data[0]['metadata']['platform'] }},{{ result['suite'] }},{{ result['name'] }},{{ result['result'] }}
+{{ job_id }},{{ data[0]['health']}},{{ data[0]['device_type']}},{{ data[0]['metadata']['build_name'] }},{{ data[0]['metadata']['build_no'] }},{{ data[0]['metadata']['platform'] }},{{ result['suite'] }},{{ result['name'] }},{{ result['result'] }}
 {%- endfor %}
 {%- else %}
-{{ job_id }},{{ data[0]['health']}},{{ data[0]['device_type']}},{{ data[0]['metadata']['build_name'] }},{{ data[0]['metadata']['build_no'] }},{{ data[0]['metadata']['compiler'] }},{{ data[0]['metadata']['build_type'] }},{{ data[0]['metadata']['boot_type'] }},{{ data[0]['metadata']['platform'] }},,,
+{{ job_id }},{{ data[0]['health']}},{{ data[0]['device_type']}},{{ data[0]['metadata']['build_name'] }},{{ data[0]['metadata']['build_no'] }},{{ data[0]['metadata']['platform'] }},,,
 {%- endif %}
 {%- endfor %}
 {%- endfor %}
diff --git a/lava_helper/lava_create_jobs.py b/lava_helper/lava_create_jobs.py
index ce14d24..cfee0ed 100755
--- a/lava_helper/lava_create_jobs.py
+++ b/lava_helper/lava_create_jobs.py
@@ -22,15 +22,6 @@
 from lava_helper_configs import *
 
 
-def get_artifact_url(artifact_store_url, params, filename):
-    platform = params["platform"]
-    if params["device_type"] == "fvp":
-        platform = "fvp"
-
-    url = "{}/artifact/trusted-firmware-m/build/bin/{}".format(artifact_store_url.rstrip("/"), filename)
-    return url
-
-
 def get_recovery_url(recovery_store_url, recovery):
     return "{}/{}".format(recovery_store_url.rstrip('/'), recovery)
 
@@ -46,9 +37,6 @@
         print("No template found for config: %s" % config_key)
         sys.exit(1)
 
-    config["build_no"] = user_args.build_no
-    config["artifact_store_url"] = user_args.jenkins_build_url
-
     # Add the template folder
     config["templ"] = os.path.join(user_args.template_dir, config["templ"])
     return config
@@ -61,74 +49,58 @@
     template_loader = FileSystemLoader(searchpath=work_dir)
     template_env = Environment(loader=template_loader)
     recovery_store_url = config.get('recovery_store_url', '')
-    build_no = user_args.build_no
-    artifact_store_url = config["artifact_store_url"]
     template_file = config.pop("templ")
 
     definitions = {}
 
     for platform, recovery in config["platforms"].items():
-        if platform != user_args.platform:
+        if platform != os.getenv('TFM_PLATFORM'):
             continue
         recovery_image_url = get_recovery_url(recovery_store_url, recovery)
-        for compiler in config["compilers"]:
-            if compiler != user_args.compiler:
-                continue
-            for build_type in config["build_types"]:
-                if build_type != user_args.build_type:
-                    continue
-                for boot_type in config["boot_types"]:
-                    bl2_string = "BL2" if user_args.bl2 else "NOBL2"
-                    if boot_type != bl2_string:
-                        continue
-                    for test_name, test_dict in config["tests"].items():
-                        if "Config{}".format(test_name) != user_args.proj_config:
-                            continue
-                        params = {
-                            "device_type": config["device_type"],
-                            "job_timeout": config["job_timeout"],
-                            "action_timeout": config.get("action_timeout", ''),
-                            "monitor_timeout": config.get("monitor_timeout", ''),
-                            "poweroff_timeout": config.get("poweroff_timeout", ''),
-                            "compiler": compiler,
-                            "build_type": build_type,
-                            "build_no": build_no,
-                            "boot_type": boot_type,
-                            "name": test_name,
-                            "test": test_dict,
-                            "platform": platform,
-                            "recovery_image_url": recovery_image_url,
-                            "data_bin_offset": config.get('data_bin_offset', ''),
-                            "docker_prefix": vars(user_args).get('docker_prefix', ''),
-                            "license_variable": vars(user_args).get('license_variable', ''),
-                            "enable_code_coverage": user_args.enable_code_coverage == "TRUE",
-                            "coverage_trace_plugin": coverage_trace_plugin,
-                            "build_job_url": artifact_store_url,
-                            "cpu0_baseline": config.get("cpu0_baseline", 0),
-                            "cpu0_initvtor_s": config.get("cpu0_initvtor_s", "0x10000000"),
-                            "psa_api_suite": user_args.psa_suite,
-                        }
-                        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": "{}_{}_{}".format(os.getenv('CONFIG_NAME'), params['build_no'], params["device_type"]),
-                                "build_name": os.getenv('CONFIG_NAME')
-                            }
-                        )
+        if os.getenv("TEST_REGRESSION") == "True":
+            monitor_name = "reg_tests"
+        elif os.getenv("TEST_PSA_API") != "OFF":
+            monitor_name = "arch_tests"
+        else:
+            monitor_name = "no_reg_tests"
+        params = {
+            "job_name": "{}_{}_{}".format(os.getenv('CONFIG_NAME'), os.getenv("BUILD_NUMBER"), config["device_type"]),
+            "build_name": os.getenv('CONFIG_NAME'),
+            "device_type": config["device_type"],
+            "job_timeout": config["job_timeout"],
+            "action_timeout": config.get("action_timeout", ''),
+            "monitor_timeout": config.get("monitor_timeout", ''),
+            "poweroff_timeout": config.get("poweroff_timeout", ''),
+            "build_no": os.getenv("BUILD_NUMBER"),
+            "name": monitor_name,
+            "monitors": config['monitors'].get(monitor_name, []),
+            "platform": platform,
+            "recovery_image_url": recovery_image_url,
+            "data_bin_offset": config.get('data_bin_offset', ''),
+            "docker_prefix": vars(user_args).get('docker_prefix', ''),
+            "license_variable": vars(user_args).get('license_variable', ''),
+            "enable_code_coverage": user_args.enable_code_coverage == "TRUE",
+            "coverage_trace_plugin": coverage_trace_plugin,
+            "build_job_url": os.getenv("BUILD_URL"),
+            "cpu0_baseline": config.get("cpu0_baseline", 0),
+            "cpu0_initvtor_s": config.get("cpu0_initvtor_s", "0x10000000"),
+            "psa_api_suite": os.getenv("TEST_PSA_API") if os.getenv("TEST_PSA_API") == "IPC" else "",
+        }
+        for binary_type, binary_name in config["binaries"].items():
+            params.update(
+                {
+                    "{}_url".format(binary_type): "{}/artifact/trusted-firmware-m/build/bin/{}".format(params["build_job_url"], binary_name)
+                }
+            )
 
-                        definition = template_env.get_template(template_file).render(
-                            params
-                        )
-                        definitions.update({params["job_name"]: definition})
+        if len(params["monitors"]) == 0:
+            break
+
+        definition = template_env.get_template(template_file).render(
+            params
+        )
+        definitions.update({params["job_name"]: definition})
+
     return definitions
 
 
@@ -138,10 +110,10 @@
     # Evaluate current directory
     work_dir = os.path.abspath(os.path.dirname(__file__))
 
-    # If a single platform is requested and it exists in the platform
-    if user_args.platform and user_args.platform in config["platforms"]:
+    # If platform exists in the LAVA platforms
+    if os.getenv("TFM_PLATFORM") in config["platforms"]:
         # Only test this platform
-        platform = user_args.platform
+        platform = os.getenv("TFM_PLATFORM")
         config["platforms"] = {platform: config["platforms"][platform]}
     # Generate the output definition
     definitions = generate_test_definitions(config, work_dir, user_args)
@@ -186,13 +158,6 @@
         help="Select built-in configuration by name",
     )
     cmdargs.add_argument(
-        "--build-number",
-        dest="build_no",
-        action="store",
-        default="lastSuccessfulBuild",
-        help="JENKINS Build number selector. " "Default: lastSuccessfulBuild",
-    )
-    cmdargs.add_argument(
         "--output-dir",
         dest="lava_def_output",
         action="store",
@@ -200,18 +165,6 @@
         help="Set LAVA compatible .yaml output file",
     )
     cmdargs.add_argument(
-        "--platform",
-        dest="platform",
-        action="store",
-        help="Override platform.Only the provided one " "will be tested",
-    )
-    cmdargs.add_argument(
-        "--compiler",
-        dest="compiler",
-        action="store",
-        help="Compiler to build definitions for",
-    )
-    cmdargs.add_argument(
         "--jenkins-build-url",
         dest="jenkins_build_url",
         action="store",
@@ -225,12 +178,6 @@
         help="Set the jenkins job name",
     )
     cmdargs.add_argument(
-        "--proj-config", dest="proj_config", action="store", help="Proj config"
-    )
-    cmdargs.add_argument(
-        "--build-type", dest="build_type", action="store", help="Build type"
-    )
-    cmdargs.add_argument(
         "--docker-prefix", dest="docker_prefix", action="store", help="Prefix string for the FVP docker registry location"
     )
     cmdargs.add_argument(
@@ -239,10 +186,6 @@
     cmdargs.add_argument(
         "--enable-code-coverage", dest="enable_code_coverage", action="store", default="FALSE", help="Enable trace-base code coverage"
     )
-    cmdargs.add_argument("--bl2", dest="bl2", action="store_true", help="BL2")
-    cmdargs.add_argument(
-        "--psa-api-suite", dest="psa_suite", action="store", help="PSA API Suite name"
-    )
 
     device_type.add_argument(
         "--fvp-only",
diff --git a/lava_helper/lava_helper_configs.py b/lava_helper/lava_helper_configs.py
index eb465df..db4985a 100644
--- a/lava_helper/lava_helper_configs.py
+++ b/lava_helper/lava_helper_configs.py
@@ -19,110 +19,64 @@
 __project__ = "Trusted Firmware-M Open CI"
 __version__ = "1.4.0"
 
+
+import os
+
+
 tf_downloads="https://downloads.trustedfirmware.org"
 coverage_trace_plugin=tf_downloads + "/coverage-plugin/qa-tools/coverage-tool/coverage-plugin/coverage_trace.so"
 
-def lava_gen_get_config_subset(config,
-                               default=True,
-                               core=True,
-                               regression=True):
-    """ Allow dynamic generation of configuration combinations by subtracking
-    undesired ones """
 
-    from copy import deepcopy
-    cfg = deepcopy(config)
-    tests = deepcopy(config["tests"])
-
-    # Remove all configs not requests by the caller
-    if not default:
-        tests.pop("Default")
-    if not core:
-        tests.pop("CoreIPC")
-        tests.pop("CoreIPCTfmLevel2")
-        tests.pop("CoreIPCTfmLevel3")
-    if not regression:
-        tests.pop("Regression")
-
-    cfg["tests"] = tests
-    return cfg
-
-# LAVA test-monitor definition for configs with regression tests.
+# LAVA test-monitor definition for configs without regression tests.
 # "Non-Secure system starting..." is expected to indicate
 # that TF-M has been booted successfully.
-monitors_no_reg_tests = [
-    {
-        'name': 'NS_SYSTEM_BOOTING',
-        'start': 'Non-Secure system',
-        'end': r'starting\\.{3}',
-        'pattern': r'Non-Secure system starting\\.{3}',
-        'fixup': {"pass": "!", "fail": ""},
-    }
-]
+monitors_no_reg_tests = {
+    'name': 'NS_SYSTEM_BOOTING',
+    'start': 'Non-Secure system',
+    'end': r'starting\\.{3}',
+    'pattern': r'Non-Secure system starting\\.{3}',
+    'fixup': {"pass": "!", "fail": ""},
+}
 
-# LAVA test-monitor definitions for configs with regression tests.
+# LAVA test-monitor definitions for configs with tests.
 # Results of each test case is parsed separately, capturing test case id.
 # Works across any test suites enabled.
-monitors_ns_reg_tests = [
-    {
-        'name': 'regression_suite',
-        'start': 'Execute test suites',
-        'end': 'End of Non-secure test suites',
-        'pattern': r"TEST: (?P<test_case_id>.+?) - (?P<result>(PASSED|FAILED|SKIPPED))",
-        'fixup': {"pass": "PASSED", "fail": "FAILED", "skip": "SKIPPED"},
-    },
-]  # Monitors
-monitors_s_reg_tests = [
-    {
-        'name': 'regression_suite',
-        'start': 'Execute test suites',
-        'end': 'End of Secure test suites',
-        'pattern': r"TEST: (?P<test_case_id>.+?) - (?P<result>(PASSED|FAILED|SKIPPED))",
-        'fixup': {"pass": "PASSED", "fail": "FAILED", "skip": "SKIPPED"},
-    },
-]  # Monitors
+monitors_mcuboot_tests = {
+    'name': 'mcuboot_suite',
+    'start': 'Execute test suites for the MCUBOOT area',
+    'end': 'End of MCUBOOT test suites',
+    'pattern': r"TEST: (?P<test_case_id>.+?) - (?P<result>(PASSED|FAILED|SKIPPED))",
+    'fixup': {"pass": "PASSED", "fail": "FAILED", "skip": "SKIPPED"},
+}
 
-# LAVA test-monitor definition for PSA API testsuites, testcases identified
-# by "UT" value in output (testcase identifier).
-monitors_psaapitest_by_ut = [
-    {
-        'name': 'psa_api_suite',
-        'start': 'Running..',
-        'end': 'Entering standby..',
-        'pattern': r" UT: +(?P<test_case_id>[A-Za-z0-9_]+)\r?\n"
-                   r".+?"
-                   r"TEST RESULT: (?P<result>(PASSED|FAILED|SKIPPED))",
-        'fixup': {"pass": "PASSED", "fail": "FAILED", "skip": "SKIPPED"},
-    },
-]
+monitors_s_reg_tests = {
+    'name': 'secure_regression_suite',
+    'start': 'Execute test suites for the Secure area',
+    'end': 'End of Secure test suites',
+    'pattern': r"TEST: (?P<test_case_id>.+?) - (?P<result>(PASSED|FAILED|SKIPPED))",
+    'fixup': {"pass": "PASSED", "fail": "FAILED", "skip": "SKIPPED"},
+}
 
-# LAVA test-monitor definition for PSA API testsuites, testcases identified
-# by description in output (for when UT is not set to unique identifier).
-monitors_psaapitest_by_desc = [
-    {
-        'name': 'psa_api_suite',
-        'start': 'Running..',
-        'end': 'Entering standby..',
-        'pattern': r" DESCRIPTION: +(?P<test_case_id>.+?) \\|"
-                   r".+?"
-                   r"TEST RESULT: (?P<result>(PASSED|FAILED|SKIPPED))",
-        'fixup': {"pass": "PASSED", "fail": "FAILED", "skip": "SKIPPED"},
-    },
-]
+monitors_ns_reg_tests = {
+    'name': 'non_secure_regression_suite',
+    'start': 'Execute test suites for the Non-secure area',
+    'end': 'End of Non-secure test suites',
+    'pattern': r"TEST: (?P<test_case_id>.+?) - (?P<result>(PASSED|FAILED|SKIPPED))",
+    'fixup': {"pass": "PASSED", "fail": "FAILED", "skip": "SKIPPED"},
+}
 
-monitors_psaapitest_ff = [
-    {
-        'name': 'psa_api_suite',
-        'start': 'Running..',
-        'end': 'Entering standby..',
-        'pattern': r" DESCRIPTION: +(?P<test_case_id>.+?)\r?\n"
-                   r".+"
-                   r"TEST RESULT: (?P<result>(PASSED|FAILED|SKIPPED|SIM ERROR))",
-        'fixup': {"pass": "PASSED", "fail": "FAILED", "skip": "SKIPPED"},
-    },
-]
+monitors_arch_tests = {
+    'name': 'psa_api_suite',
+    'start': 'Running..',
+    'end': 'Entering standby..',
+    'pattern': r" DESCRIPTION: +(?P<test_case_id>.+?)\r?\n"
+                r".+?"
+                r"TEST RESULT: (?P<result>(PASSED|FAILED|SKIPPED|SIM ERROR))",
+    'fixup': {"pass": "PASSED", "fail": "FAILED", "skip": "SKIPPED", "sim_error": "SIM ERROR"},
+}
 
 
-# MPS2 with BL2 bootloader
+# MPS2 with BL2 bootloader for AN521
 # IMAGE0ADDRESS: 0x10000000
 # IMAGE0FILE: \Software\bl2.bin  ; BL2 bootloader
 # IMAGE1ADDRESS: 0x10080000
@@ -136,97 +90,19 @@
     "monitor_timeout": 15,
     "poweroff_timeout": 1,
     "recovery_store_url": "https://ci.trustedfirmware.org/userContent/",
-    "platforms": {"AN521": "mps2_sse200_an512_new.tar.gz"},
-    "compilers": ["GCC", "ARMCLANG"],
-    "build_types": ["Debug", "Release", "Minsizerel"],
-    "boot_types": ["BL2"],
+    "platforms": {"arm/mps2/an521": "mps2_sse200_an512_new.tar.gz"},
     "binaries": {
         "firmware": "tfm_s_ns_signed.bin",
         "bootloader": "bl2.bin"
     },
-    "tests": {
-        'Default': {
-            "monitors": monitors_no_reg_tests
-        },  # Default
-        'DefaultProfileS': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileS
-        'DefaultProfileM': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileM
-        'DefaultProfileL': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileL
-        'Regression': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionProfileM': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileM
-        'RegressionProfileS': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileS
-        'RegressionProfileL': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileL
-        'RegressionIPC': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionIPCTfmLevel2': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionIPCTfmLevel3': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'CoreIPC': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPC
-        'CoreIPCTfmLevel2': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPCTfmLevel2
-        'CoreIPCTfmLevel3': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPCTfmLevel3
-        'PsaApiTest_Crypto': {
-            "monitors": monitors_psaapitest_by_ut,
-        }, # PsaApiTest_Crypto
-        'PsaApiTestIPC_Crypto': {
-            "monitors": monitors_psaapitest_by_ut,
-        },
-        'PsaApiTestIPCTfmLevel2_Crypto': {
-            "monitors": monitors_psaapitest_by_ut,
-        },
-        'PsaApiTestIPCTfmLevel3_Crypto': {
-            "monitors": monitors_psaapitest_by_ut,
-        },
-        'PsaApiTest_STORAGE': {
-            "monitors": monitors_psaapitest_by_desc,
-        }, # PsaApiTest_Storage
-        'PsaApiTestIPC_STORAGE': {
-            "monitors": monitors_psaapitest_by_desc,
-        }, # PsaApiTestIPC_Storage
-        'PsaApiTestIPCTfmLevel2_STORAGE': {
-            "monitors": monitors_psaapitest_by_desc,
-        },
-        'PsaApiTestIPCTfmLevel3_STORAGE': {
-            "monitors": monitors_psaapitest_by_desc,
-        },
-        'PsaApiTest_Attest': {
-            "monitors": monitors_psaapitest_by_ut,
-        }, # PsaApiTest_Attest
-        'PsaApiTestIPC_Attest': {
-            "monitors": monitors_psaapitest_by_ut,
-        }, # PsaApiTestIPC_Attest
-        'PsaApiTestIPCTfmLevel2_Attest': {
-            "monitors": monitors_psaapitest_by_ut,
-        },
-        'PsaApiTestIPCTfmLevel3_Attest': {
-            "monitors": monitors_psaapitest_by_ut,
-        },
-    }  # Tests
+    "monitors": {
+        'no_reg_tests': [monitors_no_reg_tests],
+        'reg_tests': [monitors_mcuboot_tests, monitors_s_reg_tests, monitors_ns_reg_tests],
+        'arch_tests': [monitors_arch_tests] if os.getenv("TEST_PSA_API") != "IPC" else [], # FF test on FPGA not supported in LAVA yet
+    }
 }
 
-# FVP with BL2 bootloader
+# FVP with BL2 bootloader for AN552
 # firmware <-> ns <-> application: --application cpu0=bl2.axf
 # bootloader <-> s <-> data: --data cpu0=tfm_s_ns_signed.bin@0x01000000
 fvp_mps3_an552_bl2 = {
@@ -237,45 +113,19 @@
     "action_timeout": 10,
     "monitor_timeout": 15,
     "poweroff_timeout": 1,
-    "platforms": {"AN552": ""},
-    "compilers": ["GCC", "ARMCLANG"],
-    "build_types": ["Debug", "Release"],
-    "boot_types": ["BL2"],
+    "platforms": {"arm/mps3/an552": ""},
     "data_bin_offset": "0x01000000",
     "binaries": {
         "application": "bl2.axf",
         "data": "tfm_s_ns_signed.bin"
     },
-       "tests": {
-        'Default': {
-            "monitors": monitors_no_reg_tests
-        },  # Default
-        'Regression': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionIPC': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionIPCTfmLevel2': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionIPCTfmLevel3': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'CoreIPC': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPC
-        'CoreIPCTfmLevel2': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPCTfmLevel2
-        'CoreIPCTfmLevel3': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPCTfmLevel3
-
-    }  # Tests
+    "monitors": {
+        'no_reg_tests': [monitors_no_reg_tests],
+        'reg_tests': [monitors_mcuboot_tests, monitors_s_reg_tests, monitors_ns_reg_tests],
+    }
 }
 
-# FVP with BL1 and BL2 bootloader
+# FVP with BL1 and BL2 bootloader for Corstone1000
 fvp_corstone1000 = {
     "templ": "fvp_corstone1000.jinja2",
     "job_name": "fvp_corstone1000",
@@ -284,24 +134,18 @@
     "action_timeout": 10,
     "monitor_timeout": 15,
     "poweroff_timeout": 1,
-    "platforms": {"corstone1000": ""},
-    "compilers": ["GCC"],
-    "build_types": ["Debug"],
-    "boot_types": ["BL2"],
+    "platforms": {"arm/corstone1000": ""},
     "data_bin_offset": "0x68100000",
     "binaries": {
         "application": "bl1.bin",
         "data": "flash.bin"
     },
-       "tests": {
-        'RegressionIPC': {
-            "monitors": monitors_s_reg_tests
-        },  # Regression
-
-    }  # Tests
+    "monitors": {
+        'reg_tests': [monitors_mcuboot_tests, monitors_s_reg_tests] if "FVP" in os.getenv('EXTRA_PARAMS') else [],
+    }
 }
 
-# FVP with BL2 bootloader
+# FVP with BL2 bootloader for AN521
 # application: --application cpu0=bl2.axf
 # data: --data cpu0=tfm_s_ns_signed.bin@0x10080000
 fvp_mps2_an521_bl2 = {
@@ -312,184 +156,21 @@
     "action_timeout": 10,
     "monitor_timeout": 15,
     "poweroff_timeout": 1,
-    "platforms": {"AN521": ""},
-    "compilers": ["GCC", "ARMCLANG"],
-    "build_types": ["Debug", "Release", "Minsizerel"],
-    "boot_types": ["BL2"],
+    "platforms": {"arm/mps2/an521": ""},
     "data_bin_offset": "0x10080000",
     "binaries": {
         "application": "bl2.axf",
         "data": "tfm_s_ns_signed.bin"
     },
-    "tests": {
-        'Default': {
-            "monitors": monitors_no_reg_tests
-        },  # Default
-        'DefaultProfileS': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileS
-        'DefaultProfileM': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileM
-        'DefaultProfileL': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileL
-        'Regression': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionProfileM': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileM
-        'RegressionProfileS': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileS
-        'RegressionProfileL': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileL
-        'RegressionIPC': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionIPCTfmLevel2': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionIPCTfmLevel3': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'CoreIPC': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPC
-        'CoreIPCTfmLevel2': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPCTfmLevel2
-        'CoreIPCTfmLevel3': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPCTfmLevel3
-        'PsaApiTest_Crypto': {
-            "monitors": monitors_psaapitest_by_ut,
-        }, # PsaApiTest_Crypto
-        'PsaApiTestIPC_Crypto': {
-            "monitors": monitors_psaapitest_by_ut,
-        },
-        'PsaApiTestIPCTfmLevel2_Crypto': {
-            "monitors": monitors_psaapitest_by_ut,
-        },
-        'PsaApiTestIPCTfmLevel3_Crypto': {
-            "monitors": monitors_psaapitest_by_ut,
-        },
-        'PsaApiTest_STORAGE': {
-            "monitors": monitors_psaapitest_by_desc,
-        }, # PsaApiTest_Storage
-
-        'PsaApiTestIPC_STORAGE': {
-            "monitors": monitors_psaapitest_by_desc,
-        }, # PsaApiTestIPC_Storage
-        'PsaApiTestIPCTfmLevel2_STORAGE': {
-            "monitors": monitors_psaapitest_by_desc,
-        },
-        'PsaApiTestIPCTfmLevel3_STORAGE': {
-            "monitors": monitors_psaapitest_by_desc,
-        },
-        'PsaApiTest_Attest': {
-            "monitors": monitors_psaapitest_by_ut,
-        }, # PsaApiTest_Attest
-        'PsaApiTestIPC_Attest': {
-            "monitors": monitors_psaapitest_by_ut,
-        }, # PsaApiTestIPC_Attest
-        'PsaApiTestIPCTfmLevel2_Attest': {
-            "monitors": monitors_psaapitest_by_ut,
-        },
-        'PsaApiTestIPCTfmLevel3_Attest': {
-            "monitors": monitors_psaapitest_by_ut,
-        },
-
-        'PsaApiTestIPC_FF': {
-            "monitors": monitors_psaapitest_ff,
-        },
-        'PsaApiTestIPCTfmLevel2_FF': {
-            "monitors": monitors_psaapitest_ff,
-        },
-
-    }  # Tests
+    "monitors": {
+        'no_reg_tests': [monitors_no_reg_tests],
+        'reg_tests': [monitors_mcuboot_tests, monitors_s_reg_tests, monitors_ns_reg_tests],
+        'arch_tests': [monitors_arch_tests],
+    }
 }
 
 
-# FVP without BL2 bootloader
-# 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",
-    "device_type": "fvp",
-    "job_timeout": 15,
-    "action_timeout": 10,
-    "monitor_timeout": 15,
-    "poweroff_timeout": 1,
-    "platforms": {"AN521": ""},
-    "compilers": ["GCC", "ARMCLANG"],
-    "build_types": ["Debug", "Release", "Minsizerel"],
-    "boot_types": ["NOBL2"],
-    "data_bin_offset": "0x00100000",
-    "cpu_baseline": 1,
-    "binaries": {
-        "application": "tfm_s.axf",
-        "data": "tfm_ns.bin"
-    },
-    "tests": {
-        'Default': {
-            "monitors": monitors_no_reg_tests
-        },  # Default
-        'DefaultProfileS': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileS
-        'DefaultProfileM': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileM
-        'DefaultProfileL': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileL
-        'Regression': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionProfileM': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileM
-        'RegressionProfileS': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileS
-        'RegressionProfileL': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileL
-        'RegressionIPC': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionIPC
-        'RegressionIPCTfmLevel2': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionIPCTfmLevel2
-        'RegressionIPCTfmLevel3': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionIPCTfmLevel3
-        'CoreIPC': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPC
-        'CoreIPCTfmLevel2': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPCTfmLevel2
-        'CoreIPCTfmLevel3': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPCTfmLevel3
-
-        'PsaApiTestIPC_FF': {
-            "monitors": monitors_psaapitest_ff,
-        },
-        'PsaApiTestIPCTfmLevel2_FF': {
-            "monitors": monitors_psaapitest_ff,
-        },
-
-    }  # Tests
-}
-
-
-# FVP with BL2 bootloader
+# FVP with BL2 bootloader for AN519
 # application: --application cpu0=bl2.axf
 # data: --data cpu0=tfm_s_ns_signed.bin@0x10080000
 fvp_mps2_an519_bl2 = {
@@ -500,108 +181,21 @@
     "action_timeout": 10,
     "monitor_timeout": 15,
     "poweroff_timeout": 1,
-    "platforms": {"AN519": ""},
-    "compilers": ["GCC", "ARMCLANG"],
-    "build_types": ["Debug", "Release", "Minsizerel"],
-    "boot_types": ["BL2"],
+    "platforms": {"arm/mps2/an519": ""},
     "data_bin_offset": "0x10080000",
     "cpu0_baseline": 1,
     "binaries": {
         "application": "bl2.axf",
         "data": "tfm_s_ns_signed.bin"
     },
-    "tests": {
-        'Default': {
-            "monitors": monitors_no_reg_tests
-        },  # Default
-        'DefaultProfileS': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileS
-        'DefaultProfileM': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileM
-        'Regression': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionProfileM': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileM
-        'RegressionProfileS': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileS
-        'RegressionIPC': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionIPCTfmLevel2': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'CoreIPC': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPC
-        'CoreIPCTfmLevel2': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPCTfmLevel2
-    }  # Tests
+    "monitors": {
+        'no_reg_tests': [monitors_no_reg_tests],
+        'reg_tests': [monitors_mcuboot_tests, monitors_s_reg_tests, monitors_ns_reg_tests],
+    }
 }
 
 
-# FVP without BL2 bootloader
-# 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",
-    "device_type": "fvp",
-    "job_timeout": 15,
-    "action_timeout": 10,
-    "monitor_timeout": 15,
-    "poweroff_timeout": 1,
-    "platforms": {"AN519": ""},
-    "compilers": ["GCC", "ARMCLANG"],
-    "build_types": ["Debug", "Release", "Minsizerel"],
-    "boot_types": ["NOBL2"],
-    "data_bin_offset": "0x00100000",
-    "cpu0_baseline": 1,
-    "binaries": {
-        "application": "tfm_s.axf",
-        "data": "tfm_ns.bin"
-    },
-    "tests": {
-        'Default': {
-            "monitors": monitors_no_reg_tests
-        },  # Default
-        'DefaultProfileS': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileS
-        'DefaultProfileM': {
-            "monitors": monitors_no_reg_tests
-        },  # DefaultProfileM
-        'Regression': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionProfileM': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileM
-        'RegressionProfileS': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileS
-        'RegressionIPC': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionIPC
-        'RegressionIPCTfmLevel2': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionIPCTfmLevel2
-        'CoreIPC': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPC
-        'CoreIPCTfmLevel2': {
-            "monitors": monitors_no_reg_tests
-        },  # CoreIPCTfmLevel2
-    }  # Tests
-}
-
-
-# QEMU for MPS2 with BL2 bootloader
+# QEMU for AN521 with BL2 bootloader
 qemu_mps2_bl2 = {
     "templ": "qemu_mps2_bl2.jinja2",
     "job_name": "qemu_mps2_bl2",
@@ -610,30 +204,13 @@
     "action_timeout": 10,
     "monitor_timeout": 15,
     "poweroff_timeout": 1,
-    "platforms": {"AN521": ""},
-    "compilers": ["GCC", "ARMCLANG"],
-    "build_types": ["Debug", "Release"],
-    "boot_types": ["BL2"],
+    "platforms": {"arm/mps2/an521": ""},
     "binaries": {
         "firmware": "tfm_s_ns_signed.bin",
         "bootloader": "bl2.bin"
     },
-    "tests": {
-        'Regression': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionProfileS': {
-            "monitors": monitors_ns_reg_tests
-        },  # RegressionProfileS
-        'RegressionIPC': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionIPCTfmLevel2': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
-        'RegressionIPCTfmLevel3': {
-            "monitors": monitors_ns_reg_tests
-        },  # Regression
+    "monitors": {
+        'reg_tests': [monitors_mcuboot_tests, monitors_s_reg_tests, monitors_ns_reg_tests],
     }
 }
 
@@ -649,51 +226,14 @@
     "action_timeout": 20,
     "monitor_timeout": 30,
     "poweroff_timeout": 40,
-    "platforms": {"MUSCA_B1": ""},
-    "compilers": ["GCC", "ARMCLANG"],
-    "build_types": ["Debug", "Release", "Minsizerel"],
-    "boot_types": ["BL2"],
+    "platforms": {"arm/musca_b1": ""},
     "binaries": {
         "firmware": "tfm.hex",
     },
-    "tests": {
-        "Default": {
-            "monitors": monitors_no_reg_tests
-        },
-        "CoreIPC": {
-            "monitors": monitors_no_reg_tests
-        },
-        "CoreIPCTfmLevel2": {
-            "monitors": monitors_no_reg_tests
-        },
-        "CoreIPCTfmLevel3": {
-            "monitors": monitors_no_reg_tests
-        },
-        "DefaultProfileM": {
-            "monitors": monitors_no_reg_tests
-        },
-        "DefaultProfileS": {
-            "monitors": monitors_no_reg_tests
-        },
-        "Regression": {
-            "monitors": monitors_ns_reg_tests
-        },
-        "RegressionIPC": {
-            "monitors": monitors_ns_reg_tests
-        },
-        "RegressionIPCTfmLevel2": {
-            "monitors": monitors_ns_reg_tests
-        },
-        "RegressionIPCTfmLevel3": {
-            "monitors": monitors_ns_reg_tests
-        },
-        "RegressionProfileM": {
-            "monitors": monitors_ns_reg_tests
-        },
-        "RegressionProfileS": {
-            "monitors": monitors_ns_reg_tests
-        },
-    },
+    "monitors": {
+        'no_reg_tests': [monitors_no_reg_tests],
+        'reg_tests': [monitors_mcuboot_tests, monitors_s_reg_tests, monitors_ns_reg_tests],
+    }
 }
 
 # STM32L562E-DK
@@ -705,27 +245,13 @@
     "action_timeout": 15,
     "monitor_timeout": 15,
     "poweroff_timeout": 5,
-    "platforms": {"stm32l562e_dk": ""},
-    "compilers": ["GCC", "ARMCLANG"],
-    "build_types": ["Release", "Minsizerel"],
-    "boot_types": ["BL2"],
+    "platforms": {"stm/stm32l562e_dk": ""},
     "binaries": {
         "tarball": "stm32l562e-dk-tfm.tar.bz2",
     },
-    "tests": {
-        "Regression": {
-            "monitors": monitors_ns_reg_tests
-        },
-        "RegressionIPC": {
-            "monitors": monitors_ns_reg_tests
-        },
-        "RegressionIPCTfmLevel2": {
-            "monitors": monitors_ns_reg_tests
-        },
-        "RegressionIPCTfmLevel3": {
-            "monitors": monitors_ns_reg_tests
-        },
-    },
+    "monitors": {
+        'reg_tests': [monitors_mcuboot_tests, monitors_s_reg_tests, monitors_ns_reg_tests],
+    }
 }
 
 # LPCxpresso55S69
@@ -737,20 +263,13 @@
     "action_timeout": 15,
     "monitor_timeout": 15,
     "poweroff_timeout": 5,
-    "platforms": {"lpcxpresso55s69": ""},
-    "compilers": ["GCC"],
-    "build_types": ["Relwithdebinfo"],
-    "boot_types": ["NOBL2"],
+    "platforms": {"nxp/lpcxpresso55s69": ""},
     "binaries": {
         "tarball": "lpcxpresso55s69-tfm.tar.bz2",
     },
-    "tests": {
-        "DefaultProfileM": {
-            "monitors": monitors_no_reg_tests
-        },
-        "RegressionProfileM": {
-            "monitors": monitors_ns_reg_tests
-        },
+    "monitors": {
+        'no_reg_tests': [monitors_no_reg_tests],
+        'reg_tests': [monitors_s_reg_tests, monitors_ns_reg_tests],
     }
 }
 
@@ -763,28 +282,14 @@
     "action_timeout": 120,
     "monitor_timeout": 120,
     "poweroff_timeout": 5,
-    "platforms": {"psoc64": ""},
-    "compilers": ["GCC", "ARMCLANG"],
-    "build_types": ["Release", "Minsizerel"],
-    "boot_types": ["NOBL2"],
+    "platforms": {"cypress/psoc64": ""},
     "binaries": {
         "spe": "tfm_s_signed.hex",
         "nspe": "tfm_ns_signed.hex",
     },
-    "tests": {
-        "Regression": {
-            "monitors": monitors_ns_reg_tests
-        },
-        "RegressionIPC": {
-            "monitors": monitors_ns_reg_tests
-        },
-        "RegressionIPCTfmLevel2": {
-            "monitors": monitors_ns_reg_tests
-        },
-        "RegressionIPCTfmLevel3": {
-            "monitors": monitors_ns_reg_tests
-        },
-    },
+    "monitors": {
+        'reg_tests': [monitors_s_reg_tests, monitors_ns_reg_tests],
+    }
 }
 
 # All configurations should be mapped here
@@ -793,9 +298,7 @@
     "fvp_mps3_an552_bl2": fvp_mps3_an552_bl2,
     "fvp_corstone1000": fvp_corstone1000,
     "fvp_mps2_an521_bl2": fvp_mps2_an521_bl2,
-    "fvp_mps2_an521_nobl2": fvp_mps2_an521_nobl2,
     "fvp_mps2_an519_bl2": fvp_mps2_an519_bl2,
-    "fvp_mps2_an519_nobl2": fvp_mps2_an519_nobl2,
     "qemu_mps2_bl2": qemu_mps2_bl2,
     "musca_b1": musca_b1_bl2,
     "stm32l562e_dk": stm32l562e_dk,
@@ -811,12 +314,8 @@
     "action_timeout",
     "monitor_timeout",
     "recovery_store_url",
-    "artifact_store_url",
     "platforms",
-    "compilers",
-    "build_types",
-    "boot_types",
-    "tests"
+    "monitors"
 ]
 
 lava_gen_monitor_sort_order = [
diff --git a/lava_helper/lava_submit_jobs.py b/lava_helper/lava_submit_jobs.py
index 655417d..7f36f26 100755
--- a/lava_helper/lava_submit_jobs.py
+++ b/lava_helper/lava_submit_jobs.py
@@ -18,7 +18,6 @@
 import glob
 import argparse
 from lava_helper import test_lava_dispatch_credentials
-from lava_helper_configs import *
 
 
 def list_files_from_dir(user_args, job_dir=""):
diff --git a/lava_helper/lava_wait_jobs.py b/lava_helper/lava_wait_jobs.py
index 80bd3fd..abd9c8a 100755
--- a/lava_helper/lava_wait_jobs.py
+++ b/lava_helper/lava_wait_jobs.py
@@ -16,46 +16,16 @@
 """
 
 import os
-import sys
 import time
 import yaml
 import argparse
-import csv
 import shutil
 from jinja2 import Environment, FileSystemLoader
-from lava_helper_configs import *
 from lava_helper import test_lava_dispatch_credentials
 from lava_submit_jobs import submit_lava_jobs
 import codecov_helper
 
 
-cfgs = ["Default", "CoreIPC", "CoreIPCTfmLevel2", "CoreIPCTfmLevel3",
-        "Regression", "RegressionIPC",
-        "RegressionIPCTfmLevel2", "RegressionIPCTfmLevel3",
-        "DefaultProfileS", "RegressionProfileS",
-        "DefaultProfileM", "RegressionProfileM", "RegressionProfileM PSOFF",
-        "DefaultProfileL", "RegressionProfileL",
-        "PsaApiTest (Attest)", "PsaApiTestIPC (Attest)",
-        "PsaApiTestIPCTfmLevel2 (Attest)",
-        "PsaApiTest (Crypto)", "PsaApiTestIPC (Crypto)",
-        "PsaApiTestIPCTfmLevel2 (Crypto)",
-        "PsaApiTest (PS)", "PsaApiTestIPC (PS)",
-        "PsaApiTestIPCTfmLevel2 (PS)",
-        "PsaApiTest (ITS)", "PsaApiTestIPC (ITS)",
-        "PsaApiTestIPCTfmLevel2 (ITS)",
-        "PsaApiTestIPC (FF)",
-        "PsaApiTestIPCTfmLevel2 (FF)",
-        "PsaApiTest (STORAGE)",
-        "PsaApiTestIPC (STORAGE)",
-        "PsaApiTestIPCTfmLevel2 (STORAGE)",
-        "PsaApiTestIPCTfmLevel3 (STORAGE)",
-        "PsaApiTestIPCTfmLevel3 (ITS)", "PsaApiTestIPCTfmLevel3 (PS)",
-        "PsaApiTestIPCTfmLevel3 (Crypto)", "PsaApiTestIPCTfmLevel3 (Attest)",
-        "PsaApiTestIPCTfmLevel3 (FF)"]
-
-# Convert test config identifiers to LAVA naming convention.
-cfgs = [x.replace(" (", "_").replace(")", "") for x in cfgs]
-
 def wait_for_jobs(user_args):
     job_list = user_args.job_ids.split(",")
     job_list = [int(x) for x in job_list if x != '']
@@ -68,7 +38,6 @@
         finished_jobs.update(finished_resubmit_jobs)
     return finished_jobs
 
-
 def process_finished_jobs(finished_jobs, user_args):
     print_lava_urls(finished_jobs, user_args)
     test_report(finished_jobs, user_args)
@@ -77,7 +46,6 @@
     csv_report(finished_jobs)
     codecov_helper.coverage_reports(finished_jobs, user_args)
 
-
 def get_finished_jobs(job_list, user_args, lava):
     finished_jobs = lava.block_wait_for_jobs(job_list, user_args.dispatch_timeout, 5)
     unfinished_jobs = [item for item in job_list if item not in finished_jobs]
@@ -110,7 +78,6 @@
     resubmitted_jobs = [int(x) for x in resubmitted_jobs if x != '']
     return resubmitted_jobs
 
-
 def fetch_artifacts(jobs, user_args, lava):
     if not user_args.artifacts_path:
         return
@@ -163,8 +130,8 @@
             if info['metadata']['platform']   == record["Platform"] and \
                info['metadata']['compiler']   == record["Compiler"] and \
                info['metadata']['build_type'] == record["Build Type"]:
-                if record[info['metadata']['name']] != "FAIL":
-                    record[info['metadata']['name']] = generateTestResult(info)
+                if record[info['metadata']['build_name']] != "FAIL":
+                    record[info['metadata']['build_name']] = generateTestResult(info)
                 exist = True
                 break
         if not exist:
@@ -172,14 +139,14 @@
             record["Platform"] = info['metadata']['platform']
             record["Compiler"] = info['metadata']['compiler']
             record["Build Type"] = info['metadata']['build_type']
-            record["Config Name"] = info['metadata']['name']
+            record["Config Name"] = info['metadata']['build_name']
             for cfg in cfgs:
                 record[cfg] = "N.A."
             record[info['metadata']['name']] = generateTestResult(info)
             lava_jobs.append(record)
     lava_jobs.sort(key=lambda x: x["Platform"] + x["Compiler"] + x["Build Type"])
     with open("test_results.csv", "w", newline="") as csvfile:
-        fieldnames = ["Platform", "Compiler", "Build Type"] + cfgs
+        fieldnames = ["Platform", "Compiler", "Build Type"] + list(cfgs)
         writer = csv.DictWriter(csvfile, fieldnames=fieldnames, extrasaction='ignore')
 
         writer.writeheader()