Build: Enable linking with PSA API compliance tests in the NS app
This change modifies the build system to support linking
the PSA API compliance test static libraries. It introduces
a new build configuration ConfigPsaApiTest.cmake for this purpose.
The build instructions are updated to show an example of how
to use this new build configuration.
Change-Id: Iabf4876504e690826fe80b467a91fa53bffb0b47
Signed-off-by: Jamie Fox <jamie.fox@arm.com>
Co-Authored-by: Antonio de Angelis <antonio.deangelis@arm.com>
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index 964a51c..870e896 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2018, Arm Limited. All rights reserved.
+# Copyright (c) 2018-2019, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -126,7 +126,7 @@
if (CORE_TEST)
set(CORE_TEST_POSITIVE ON)
set(CORE_TEST_INTERACTIVE OFF)
- set (TFM_PARTITION_TEST_SECURE_SERVICES ON)
+ set(TFM_PARTITION_TEST_SECURE_SERVICES ON)
add_definitions(-DTFM_PARTITION_TEST_SECURE_SERVICES)
endif()
@@ -171,6 +171,20 @@
add_definitions(-DTFM_PARTITION_TEST_SST)
endif()
+if (PSA_API_TEST)
+ add_definitions(-DPSA_API_TEST_NS)
+ set(PSA_API_TEST_NS ON)
+ if (NOT DEFINED PSA_API_TEST_CRYPTO)
+ set(PSA_API_TEST_CRYPTO OFF)
+ endif()
+ if (NOT DEFINED PSA_API_TEST_SECURE_STORAGE)
+ set(PSA_API_TEST_SECURE_STORAGE OFF)
+ endif()
+ if (NOT DEFINED PSA_API_TEST_ATTESTATION)
+ set(PSA_API_TEST_ATTESTATION OFF)
+ endif()
+endif()
+
# This flag indicates if the non-secure OS is capable of identify the non-secure clients
# which call the secure services
if (NOT DEFINED TFM_NS_CLIENT_IDENTIFICATION)