Add psa arch test components

In preparation for running PSA arch tests against TS service
providers, add an external component for the arch tests and add
deployments for building the different test suites.

Signed-off-by: Julian Hall <julian.hall@arm.com>
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
Change-Id: Ifcc746b1d3c876734b711cb48547c56a5b1856c3
diff --git a/deployments/ts-arch-test/crypto/arm-linux/CMakeLists.txt b/deployments/ts-arch-test/crypto/arm-linux/CMakeLists.txt
new file mode 100644
index 0000000..8d58643
--- /dev/null
+++ b/deployments/ts-arch-test/crypto/arm-linux/CMakeLists.txt
@@ -0,0 +1,24 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+cmake_minimum_required(VERSION 3.16)
+include(../../../deployment.cmake REQUIRED)
+
+#-------------------------------------------------------------------------------
+#  The CMakeLists.txt for building the ts-arch-test deployment for arm-linux
+#
+#  Used for building and running psa arch tests on an Arm based Linux device
+#-------------------------------------------------------------------------------
+include(${TS_ROOT}/environments/arm-linux/env.cmake)
+project(trusted-services LANGUAGES CXX C)
+add_executable(ts-arch-test)
+target_include_directories(ts-arch-test PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
+
+#-------------------------------------------------------------------------------
+#  Extend with components that are common across all deployments of
+#  ts-arch-test/crypto
+#-------------------------------------------------------------------------------
+include(../crypto-arch-test.cmake REQUIRED)
diff --git a/deployments/ts-arch-test/crypto/crypto-arch-test.cmake b/deployments/ts-arch-test/crypto/crypto-arch-test.cmake
new file mode 100644
index 0000000..93ade3b
--- /dev/null
+++ b/deployments/ts-arch-test/crypto/crypto-arch-test.cmake
@@ -0,0 +1,35 @@
+#-------------------------------------------------------------------------------
+# 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 CRYPTO CACHE STRING "Arch test suite")
+
+#-------------------------------------------------------------------------------
+#  Crypto specific components
+#
+#-------------------------------------------------------------------------------
+
+# Configuration for mbedcrypto
+set(MBEDTLS_USER_CONFIG_FILE
+	"${TS_ROOT}/components/service/crypto/client/cpp/config_mbedtls_user.h"
+	CACHE STRING "Configuration file for mbedcrypto")
+
+# Mbed TLS provides libmbedcrypto
+include(${TS_ROOT}/external/MbedTLS/MbedTLS.cmake)
+target_link_libraries(ts-arch-test PRIVATE mbedcrypto)
+
+# Export psa crypto API
+list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${PSA_CRYPTO_API_INCLUDE})
+
+#-------------------------------------------------------------------------------
+#  Extend with components that are common across all deployments of
+#  ts-arch-test
+#-------------------------------------------------------------------------------
+include(../../ts-arch-test.cmake REQUIRED)
diff --git a/deployments/ts-arch-test/crypto/linux-pc/CMakeLists.txt b/deployments/ts-arch-test/crypto/linux-pc/CMakeLists.txt
new file mode 100644
index 0000000..f5b286e
--- /dev/null
+++ b/deployments/ts-arch-test/crypto/linux-pc/CMakeLists.txt
@@ -0,0 +1,25 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+cmake_minimum_required(VERSION 3.16)
+include(../../../deployment.cmake REQUIRED)
+
+#-------------------------------------------------------------------------------
+#  The CMakeLists.txt for building the ts-arch-test deployment for linux-pc
+#
+#  Used for building and running psa arch tests in a native PC enviroment.
+#  Tests can be run by running the built executable called "ts-arch-test"
+#-------------------------------------------------------------------------------
+include(${TS_ROOT}/environments/linux-pc/env.cmake)
+project(trusted-services LANGUAGES CXX C)
+add_executable(ts-arch-test)
+target_include_directories(ts-arch-test PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
+
+#-------------------------------------------------------------------------------
+#  Extend with components that are common across all deployments of
+#  ts-arch-test/crypto
+#-------------------------------------------------------------------------------
+include(../crypto-arch-test.cmake REQUIRED)