tests/configs: Adjusted for migration of MBEDTLS_PSA_CRYPTO_CONFIG_FILE.

Moving forward the MBEDTLS_PSA_CRYPTO_CONFIG_FILE now resides in the
ts-psa/crypto configuration. This patch removes it from the library
configuration files, and updates the tests to explicitely use it.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
diff --git a/tests/scripts/components-configuration-tls.sh b/tests/scripts/components-configuration-tls.sh
index b522419..701a42c 100644
--- a/tests/scripts/components-configuration-tls.sh
+++ b/tests/scripts/components-configuration-tls.sh
@@ -11,7 +11,8 @@
 
 component_test_config_suite_b () {
     msg "build: configs/config-suite-b.h"
-    cp configs/config-suite-b.h "$CONFIG_H"
+    MBEDTLS_CONFIG="configs/config-suite-b.h"
+    CRYPTO_CONFIG="configs/crypto-config-suite-b.h"
     # test-ref-configs works by overwriting mbedtls_config.h; this makes cmake
     # want to re-generate generated files that depend on it, quite correctly.
     # However this doesn't work as the generation script expects a specific
@@ -21,7 +22,7 @@
     # whether they're on or off. So, disable cmake's (over-sensitive here)
     # dependency resolution for generated files and just rely on them being
     # present (thanks to pre_generate_files) by turning GEN_FILES off.
-    CC=$ASAN_CC cmake -D GEN_FILES=Off -D CMAKE_BUILD_TYPE:String=Asan .
+    CC=$ASAN_CC cmake -D GEN_FILES=Off -DMBEDTLS_CONFIG_FILE="$MBEDTLS_CONFIG" -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE="$CRYPTO_CONFIG" -D CMAKE_BUILD_TYPE:String=Asan .
     make
 
     msg "test: configs/config-suite-b.h - unit tests"
@@ -33,8 +34,8 @@
     msg "build: configs/config-suite-b.h + DEBUG"
     MBEDTLS_TEST_CONFIGURATION="$MBEDTLS_TEST_CONFIGURATION+DEBUG"
     make clean
-    scripts/config.py set MBEDTLS_DEBUG_C
-    scripts/config.py set MBEDTLS_ERROR_C
+    scripts/config.py -f "$MBEDTLS_CONFIG" set MBEDTLS_DEBUG_C
+    scripts/config.py -f "$MBEDTLS_CONFIG" set MBEDTLS_ERROR_C
     make ssl-opt
 
     msg "test: configs/config-suite-b.h + DEBUG - ssl-opt.sh"
@@ -158,7 +159,8 @@
 
 component_test_config_thread () {
     msg "build: configs/config-thread.h"
-    cp configs/config-thread.h "$CONFIG_H"
+    MBEDTLS_CONFIG="configs/config-thread.h"
+    CRYPTO_CONFIG="configs/crypto-config-thread.h"
     # test-ref-configs works by overwriting mbedtls_config.h; this makes cmake
     # want to re-generate generated files that depend on it, quite correctly.
     # However this doesn't work as the generation script expects a specific
@@ -168,7 +170,7 @@
     # whether they're on or off. So, disable cmake's (over-sensitive here)
     # dependency resolution for generated files and just rely on them being
     # present (thanks to pre_generate_files) by turning GEN_FILES off.
-    CC=$ASAN_CC cmake -D GEN_FILES=Off -D CMAKE_BUILD_TYPE:String=Asan .
+    CC=$ASAN_CC cmake -D GEN_FILES=Off -DMBEDTLS_CONFIG_FILE="$MBEDTLS_CONFIG" -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE="$CRYPTO_CONFIG" -D CMAKE_BUILD_TYPE:String=Asan .
     make
 
     msg "test: configs/config-thread.h - unit tests"
@@ -180,7 +182,8 @@
 
 component_test_tls1_2_ccm_psk () {
     msg "build: configs/config-ccm-psk-tls1_2.h"
-    cp configs/config-ccm-psk-tls1_2.h "$CONFIG_H"
+    MBEDTLS_CONFIG="configs/config-ccm-psk-tls1_2.h"
+    CRYPTO_CONFIG="configs/crypto-config-ccm-psk-tls1_2.h"
     # test-ref-configs works by overwriting mbedtls_config.h; this makes cmake
     # want to re-generate generated files that depend on it, quite correctly.
     # However this doesn't work as the generation script expects a specific
@@ -190,7 +193,7 @@
     # whether they're on or off. So, disable cmake's (over-sensitive here)
     # dependency resolution for generated files and just rely on them being
     # present (thanks to pre_generate_files) by turning GEN_FILES off.
-    CC=$ASAN_CC cmake -D GEN_FILES=Off -D CMAKE_BUILD_TYPE:String=Asan .
+    CC=$ASAN_CC cmake -D GEN_FILES=Off -DMBEDTLS_CONFIG_FILE="$MBEDTLS_CONFIG" -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE="$CRYPTO_CONFIG" -D CMAKE_BUILD_TYPE:String=Asan .
     make
 
     msg "test: configs/config-ccm-psk-tls1_2.h - unit tests"
@@ -202,7 +205,8 @@
 
 component_test_tls1_2_ccm_psk_dtls () {
     msg "build: configs/config-ccm-psk-dtls1_2.h"
-    cp configs/config-ccm-psk-dtls1_2.h "$CONFIG_H"
+    MBEDTLS_CONFIG="configs/config-ccm-psk-dtls1_2.h"
+    CRYPTO_CONFIG="configs/crypto-config-ccm-psk-tls1_2.h"
     # test-ref-configs works by overwriting mbedtls_config.h; this makes cmake
     # want to re-generate generated files that depend on it, quite correctly.
     # However this doesn't work as the generation script expects a specific
@@ -212,7 +216,7 @@
     # whether they're on or off. So, disable cmake's (over-sensitive here)
     # dependency resolution for generated files and just rely on them being
     # present (thanks to pre_generate_files) by turning GEN_FILES off.
-    CC=$ASAN_CC cmake -D GEN_FILES=Off -D CMAKE_BUILD_TYPE:String=Asan .
+    CC=$ASAN_CC cmake -D GEN_FILES=Off -DMBEDTLS_CONFIG_FILE="$MBEDTLS_CONFIG" -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE="$CRYPTO_CONFIG" -D CMAKE_BUILD_TYPE:String=Asan .
     make
 
     msg "test: configs/config-ccm-psk-dtls1_2.h - unit tests"
@@ -224,8 +228,8 @@
     msg "build: configs/config-ccm-psk-dtls1_2.h + DEBUG"
     MBEDTLS_TEST_CONFIGURATION="$MBEDTLS_TEST_CONFIGURATION+DEBUG"
     make clean
-    scripts/config.py set MBEDTLS_DEBUG_C
-    scripts/config.py set MBEDTLS_ERROR_C
+    scripts/config.py -f "$MBEDTLS_CONFIG" set MBEDTLS_DEBUG_C
+    scripts/config.py -f "$MBEDTLS_CONFIG" set MBEDTLS_ERROR_C
     make ssl-opt
 
     msg "test: configs/config-ccm-psk-dtls1_2.h + DEBUG - ssl-opt.sh"