blob: 480a168026be923332086e8918bf8bdeeb78389c [file] [log] [blame]
Raef Coles652bb8a2020-09-24 11:27:38 +01001#-------------------------------------------------------------------------------
Sherry Zhang92c499a2021-03-08 18:14:15 +08002# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
Raef Coles652bb8a2020-09-24 11:27:38 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
8# Since the main test directory is a NS dir, this subdir is specifically made a
9# secure directory as it build the secure side test services
10if (TFM_MULTI_CORE_TOPOLOGY)
11 include(${CMAKE_SOURCE_DIR}/platform/ext/target/${TFM_PLATFORM}/preload.cmake)
Raef Coles34cffa72020-10-28 10:27:19 +000012 tfm_toolchain_reload_compiler()
Raef Coles652bb8a2020-09-24 11:27:38 +010013endif()
14
David Hu4f538e42020-11-09 16:46:17 +080015if (TEST_S)
16 # Secure tests are declared in this dir so that it can use the secure CPU
17 # definitions
18 add_library(tfm_s_tests INTERFACE)
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020019 if (TFM_PARTITION_CRYPTO OR FORWARD_PROT_MSG)
David Hu4f538e42020-11-09 16:46:17 +080020 add_library(tfm_test_suite_crypto_s STATIC EXCLUDE_FROM_ALL)
21 endif()
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020022 if (TFM_PARTITION_INITIAL_ATTESTATION OR FORWARD_PROT_MSG)
David Hu4f538e42020-11-09 16:46:17 +080023 add_library(tfm_test_suite_attestation_s STATIC EXCLUDE_FROM_ALL)
24 endif()
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020025 if(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE OR FORWARD_PROT_MSG)
David Hu4f538e42020-11-09 16:46:17 +080026 add_library(tfm_test_suite_its_s STATIC EXCLUDE_FROM_ALL)
27 endif()
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020028 if (TFM_PARTITION_PROTECTED_STORAGE OR FORWARD_PROT_MSG)
David Hu4f538e42020-11-09 16:46:17 +080029 add_library(tfm_test_suite_ps_s STATIC EXCLUDE_FROM_ALL)
30 endif()
31 if(NOT TFM_PSA_API AND TFM_PARTITION_AUDIT_LOG)
32 add_library(tfm_test_suite_audit_s STATIC EXCLUDE_FROM_ALL)
33 endif()
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020034 if(TFM_PARTITION_PLATFORM OR FORWARD_PROT_MSG)
David Hu4f538e42020-11-09 16:46:17 +080035 add_library(tfm_test_suite_platform_s STATIC EXCLUDE_FROM_ALL)
36 endif()
37 if(TFM_PSA_API)
38 add_library(tfm_test_suite_ipc_s STATIC EXCLUDE_FROM_ALL)
39 endif()
Sherry Zhanga59fecd2021-05-24 16:37:36 +080040 if(TFM_PARTITION_FIRMWARE_UPDATE AND TFM_FWU_TEST_SECURE)
Sherry Zhang92c499a2021-03-08 18:14:15 +080041 add_library(tfm_test_suite_fwu_s STATIC EXCLUDE_FROM_ALL)
42 endif()
Raef Coles652bb8a2020-09-24 11:27:38 +010043endif()
44
45add_subdirectory(tfm_core_test)
46add_subdirectory(tfm_core_test_2)
Raef Coles4a722782020-10-12 10:11:18 +010047if(TFM_IRQ_TEST)
Raef Colesce57e062020-10-02 10:39:41 +010048 add_subdirectory(tfm_irq_test_service_1)
49endif()
Kevin Penga8604332021-04-23 17:33:30 +080050if(TFM_ENABLE_SLIH_TEST)
51 add_subdirectory(tfm_slih_test_service)
52endif()
Raef Coles652bb8a2020-09-24 11:27:38 +010053add_subdirectory(tfm_ps_test_service)
David Hu4f538e42020-11-09 16:46:17 +080054if (TEST_S)
55 add_subdirectory(tfm_secure_client_service)
56 add_subdirectory(tfm_secure_client_2)
57endif()
Raef Coles652bb8a2020-09-24 11:27:38 +010058if(TFM_PSA_API)
59 add_subdirectory(tfm_ipc_service)
60 add_subdirectory(tfm_ipc_client)
61endif()
David Hue212bcc2021-06-04 22:05:30 +080062add_subdirectory(tfm_attest_test_service)