cmake: tf-psa-crypto: Add cmake_subproject test program

The empty framework directory is temporary. It will be
removed when TF-PSA-Crypto uses its framework submodule.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
diff --git a/tf-psa-crypto/tests/scripts/components-build-system.sh b/tf-psa-crypto/tests/scripts/components-build-system.sh
index af8e7fa..5de9dc7 100644
--- a/tf-psa-crypto/tests/scripts/components-build-system.sh
+++ b/tf-psa-crypto/tests/scripts/components-build-system.sh
@@ -22,3 +22,12 @@
     cd "$TF_PSA_CRYPTO_ROOT_DIR"
     rm -rf "$OUT_OF_SOURCE_DIR"
 }
+
+component_test_tf_psa_crypto_cmake_as_subdirectory () {
+    msg "build: cmake 'as-subdirectory' build"
+    cd programs/test/cmake_subproject
+    # Note: Explicitly generate files as these are turned off in releases
+    cmake -D GEN_FILES=ON .
+    make
+    ./cmake_subproject
+}