Build: Update ST configs

Two configs are needed on ST board:
1. Crypto test ON and other tests off
2. Crypto test OFF and other tests on
Update ST related configs to satisfy this requirement.

Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I69b5cab8415e3fa31f56dbf6467a6a904e012cee
diff --git a/build_helper/build_helper_configs.py b/build_helper/build_helper_configs.py
index aaa4905..ac2d6d2 100755
--- a/build_helper/build_helper_configs.py
+++ b/build_helper/build_helper_configs.py
@@ -410,7 +410,7 @@
                                      "toolchain_ARMCLANG.cmake"],
                 "lib_model":        [True, False],
                 "isolation_level":  ["1", "2", "3"],
-                "test_regression":  [True],
+                "test_regression":  [True, False],
                 "test_psa_api":     ["OFF"],
                 "cmake_build_type": ["Release"],
                 "with_otp":         ["off"],
@@ -420,10 +420,17 @@
                 "partition_ps":     ["ON"],
                 "fp":               ["0"],
                 "lazy":             ["OFF"],
-                "extra_params":     ["CRYPTO_OFF", "NS_ATTEST_ON"]
+                "extra_params":     ["CRYPTO_OFF", "CRYPTO_ON"]
                 },
                 "common_params": _common_tfm_builder_cfg,
-                "invalid": _common_tfm_invalid_configs + []
+                "invalid": _common_tfm_invalid_configs + [
+                    # all other tests are off when CRYPTO is ON
+                    ("stm/stm32l562e_dk", "*", "*", "*", True, "*", "*", "*",
+                     "*", "*", "*", "*", "*", "*", "CRYPTO_ON"),
+                    # all other tests are ON when CRYPTO is OFF
+                    ("stm/stm32l562e_dk", "*", "*", "*", False, "*", "*", "*",
+                     "*", "*", "*", "*", "*", "*", "CRYPTO_OFF"),
+                ]
                 }
 
 config_LPCXPRESSO55S69 = {"seed_params": {
@@ -1148,8 +1155,8 @@
                      "off", True, True, "", "ON", "0", "OFF", "CRYPTO_OFF"),
                     # stm32l562e_dk_GNUARM_IPC_2_REG_Release_BL2_NS
                     ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake",
-                     False, "2", True, "OFF", "Release",
-                     "off", True, True, "", "ON", "0", "OFF", "NS_ATTEST_ON"),
+                     False, "2", False, "OFF", "Release",
+                     "off", True, True, "", "ON", "0", "OFF", "CRYPTO_ON"),
                     # stm32l562e_dk_GNUARM_IPC_3_REG_Release_BL2_NS
                     ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake",
                      False, "3", True, "OFF", "Release",
diff --git a/jenkins/ci.jpl b/jenkins/ci.jpl
index b58c6d7..39088e4 100644
--- a/jenkins/ci.jpl
+++ b/jenkins/ci.jpl
@@ -108,6 +108,10 @@
   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(')', '')
diff --git a/tfm_ci_pylib/tfm_build_manager.py b/tfm_ci_pylib/tfm_build_manager.py
index 7275866..1b0f7c8 100644
--- a/tfm_ci_pylib/tfm_build_manager.py
+++ b/tfm_ci_pylib/tfm_build_manager.py
@@ -72,20 +72,8 @@
 mapExtraParams = {"":              "",
                   "CRYPTO_OFF":   ("-DTEST_S_CRYPTO=OFF "
                                    "-DTEST_NS_CRYPTO=OFF "),
-                  "NS_ATTEST_ON": ("-DTEST_S_CRYPTO=OFF "
-                                   "-DTEST_NS_CRYPTO=OFF "
-                                   "-DTEST_S_ITS=OFF "
-                                   "-DTEST_NS_ITS=OFF "
-                                   "-DTEST_S_PLATFORM=OFF "
-                                   "-DTEST_NS_PLATFORM=OFF "
-                                   "-DTEST_NS_ATTESTATION=ON "
-                                   "-DTEST_S_ATTESTATION=OFF "
-                                   "-DTEST_NS_QCBOR=OFF "
-                                   "-DTEST_S_QCBOR=OFF "
-                                   "-DTEST_NS_T_COSE=OFF "
-                                   "-DTEST_S_T_COSE=OFF "
-                                   "-DTEST_NS_PS=OFF "
-                                   "-DTEST_S_PS=OFF "),
+                  "CRYPTO_ON":    ("-DTEST_S_CRYPTO=ON "
+                                   "-DTEST_NS_CRYPTO=ON "),
                   "NSCE":          "-DTFM_NS_MANAGE_NSID=ON ",
                   "MMIO":          "-DPSA_FRAMEWORK_HAS_MM_IOVEC=ON "}