Build: Clean tf-m-tests configurations in TF-M repo [Test repo]

Move tf-m-tests specific configurations from TF-M to tf-m-tests.

Signed-off-by: Jianliang Shen <jianliang.shen@arm.com>
Change-Id: I8204cd5e1f8660b677bac5bb19d83424098af4cf
diff --git a/test/config/default_test_config.cmake b/test/config/default_test_config.cmake
index 7d38666..c227a04 100644
--- a/test/config/default_test_config.cmake
+++ b/test/config/default_test_config.cmake
@@ -40,3 +40,35 @@
 set(TEST_S_PLATFORM         OFF        CACHE BOOL      "Whether to build S regression Platform tests")
 set(TEST_S_FWU              OFF        CACHE BOOL      "Whether to build S regression FWU tests")
 set(TEST_S_IPC              OFF        CACHE BOOL      "Whether to build S regression IPC tests")
+
+################################## Core Tests ##################################
+
+set(TFM_INTERACTIVE_TEST                OFF         CACHE BOOL      "Enable interactive tests")
+set(TFM_PERIPH_ACCESS_TEST              OFF         CACHE BOOL      "Enable peripheral access tests")
+
+################################## PS Tests ####################################
+
+set(PS_TEST_NV_COUNTERS                 ON          CACHE BOOL      "Use the test NV counters to test Protected Storage rollback scenarios")
+
+################################## Default CRYPTO Tests ########################
+
+set(TFM_CRYPTO_TEST_ALG_CBC             ON          CACHE BOOL      "Test CBC cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_CCM             ON          CACHE BOOL      "Test CCM cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_CFB             ON          CACHE BOOL      "Test CFB cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_ECB             ON          CACHE BOOL      "Test ECB cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_CTR             ON          CACHE BOOL      "Test CTR cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_OFB             ON          CACHE BOOL      "Test OFB cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_GCM             ON          CACHE BOOL      "Test GCM cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_SHA_512         ON          CACHE BOOL      "Test SHA-512 cryptography algorithm")
+set(TFM_CRYPTO_TEST_HKDF                ON          CACHE BOOL      "Test the HKDF key derivation algorithm")
+set(TFM_CRYPTO_TEST_ECDH                ON          CACHE BOOL      "Test the ECDH key agreement algorithm")
+
+################################## FWU Tests ###################################
+
+set(TFM_FWU_TEST_REQUEST_REBOOT         OFF         CACHE BOOL      "Test psa_fwu_request_reboot")
+set(TFM_FWU_TEST_WRITE_WITH_NULL        OFF         CACHE BOOL      "Test psa_fwu_write with data block NULL")
+set(TFM_FWU_TEST_QUERY_WITH_NULL        OFF         CACHE BOOL      "Test psa_fwu_query with info NULL")
+
+################################## Initial Attestation Tests ###################
+
+set(ATTEST_TEST_GET_PUBLIC_KEY          OFF         CACHE BOOL      "Require to retrieve Initial Attestation public in runtime for test purpose")
diff --git a/test/config/profile/profile_large_test.cmake b/test/config/profile/profile_large_test.cmake
new file mode 100644
index 0000000..cc0190b
--- /dev/null
+++ b/test/config/profile/profile_large_test.cmake
@@ -0,0 +1,19 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2021, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+################################## Tests #######################################
+
+# Specify the Crypto test cases
+set(TFM_CRYPTO_TEST_ALG_CBC             ON          CACHE BOOL      "Test CBC cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_CFB             OFF         CACHE BOOL      "Test CFB cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_ECB             OFF         CACHE BOOL      "Test ECB cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_CTR             OFF         CACHE BOOL      "Test CTR cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_OFB             OFF         CACHE BOOL      "Test OFB cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_GCM             ON          CACHE BOOL      "Test GCM cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_SHA_512         ON          CACHE BOOL      "Test SHA-512 cryptography algorithm")
+set(TFM_CRYPTO_TEST_HKDF                ON          CACHE BOOL      "Test the HKDF key derivation algorithm")
+set(TFM_CRYPTO_TEST_ECDH                ON          CACHE BOOL      "Test the ECDH key agreement algorithm")
diff --git a/test/config/profile/profile_medium_test.cmake b/test/config/profile/profile_medium_test.cmake
new file mode 100644
index 0000000..7110b1e
--- /dev/null
+++ b/test/config/profile/profile_medium_test.cmake
@@ -0,0 +1,20 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2021, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+################################## Tests #######################################
+
+# TFM_CRYPTO_TEST_ALG_CCM is the only test mode left enabled, to go with the
+# reduced crypto config
+set(TFM_CRYPTO_TEST_ALG_CBC             OFF         CACHE BOOL      "Test CBC cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_CFB             OFF         CACHE BOOL      "Test CFB cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_ECB             OFF         CACHE BOOL      "Test ECB cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_CTR             OFF         CACHE BOOL      "Test CTR cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_OFB             OFF         CACHE BOOL      "Test OFB cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_GCM             OFF         CACHE BOOL      "Test GCM cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_SHA_512         OFF         CACHE BOOL      "Test SHA-512 cryptography algorithm")
+set(TFM_CRYPTO_TEST_HKDF                OFF         CACHE BOOL      "Test the HKDF key derivation algorithm")
+set(TFM_CRYPTO_TEST_ECDH                ON          CACHE BOOL      "Test the ECDH key agreement algorithm")
diff --git a/test/config/profile/profile_small_test.cmake b/test/config/profile/profile_small_test.cmake
new file mode 100644
index 0000000..53176fa
--- /dev/null
+++ b/test/config/profile/profile_small_test.cmake
@@ -0,0 +1,20 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2021, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+################################## Tests #######################################
+
+# TFM_CRYPTO_TEST_ALG_CCM is the only test mode left enabled, to go with the
+# reduced crypto config
+set(TFM_CRYPTO_TEST_ALG_CBC             OFF         CACHE BOOL      "Test CBC cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_CFB             OFF         CACHE BOOL      "Test CFB cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_ECB             OFF         CACHE BOOL      "Test ECB cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_CTR             OFF         CACHE BOOL      "Test CTR cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_OFB             OFF         CACHE BOOL      "Test OFB cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_GCM             OFF         CACHE BOOL      "Test GCM cryptography mode")
+set(TFM_CRYPTO_TEST_ALG_SHA_512         OFF         CACHE BOOL      "Test SHA-512 cryptography algorithm")
+set(TFM_CRYPTO_TEST_HKDF                OFF         CACHE BOOL      "Test the HKDF key derivation algorithm")
+set(TFM_CRYPTO_TEST_ECDH                OFF         CACHE BOOL      "Test the ECDH key agreement algorithm")
diff --git a/test/config/set_config.cmake b/test/config/set_config.cmake
index 958076f..87a2bf2 100644
--- a/test/config/set_config.cmake
+++ b/test/config/set_config.cmake
@@ -84,6 +84,12 @@
     endif()
 endforeach()
 
+########################## Test profile ########################################
+
+if (TFM_PROFILE)
+    include(${TFM_TEST_PATH}/config/profile/${TFM_PROFILE}_test.cmake)
+endif()
+
 ########################## Load default config #################################
 
 if (TEST_S)