Add secure storage PSA API test deployments
Adds build files and test suite specific initialisation for building
and running PSA API tests against secure storage service providers.
Tests may be run in a native PC environment or from Linux userspace
on an Arm based Linux platform.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I58596bd176f3987c026da7c80a5d330b90763848
diff --git a/deployments/psa-api-test/protected_storage/ps-api-test.cmake b/deployments/psa-api-test/protected_storage/ps-api-test.cmake
new file mode 100644
index 0000000..fae1161
--- /dev/null
+++ b/deployments/psa-api-test/protected_storage/ps-api-test.cmake
@@ -0,0 +1,42 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+# Define test suite to build. Used by the psa_arch_tests external component
+# to configure what test suite gets built.
+#-------------------------------------------------------------------------------
+set(TS_ARCH_TEST_SUITE PROTECTED_STORAGE CACHE STRING "Arch test suite")
+
+#-------------------------------------------------------------------------------
+# The arch test build system puts its build output under a test suite specific
+# subdirectory. The subdirectory name is different from the test suite name
+# so an additional define is needed to obtain the built library.
+#-------------------------------------------------------------------------------
+set(TS_ARCH_TEST_BUILD_SUBDIR storage CACHE STRING "Arch test build subdirectory")
+
+#-------------------------------------------------------------------------------
+# Crypto specific components
+#
+#-------------------------------------------------------------------------------
+add_components(
+ TARGET "psa-api-test"
+ BASE_DIR ${TS_ROOT}
+ COMPONENTS
+ "components/service/secure_storage/include"
+ "components/service/secure_storage/frontend/psa/ps"
+ "components/service/secure_storage/backend/secure_storage_client"
+)
+
+target_sources(psa-api-test PRIVATE
+ ${TS_ROOT}/deployments/psa-api-test/protected_storage/ps_locator.c
+)
+
+#-------------------------------------------------------------------------------
+# Extend with components that are common across all deployments of
+# psa-api-test
+#-------------------------------------------------------------------------------
+include(../../psa-api-test.cmake REQUIRED)