blob: ea2c226bc0ed32acb0dd1e759470baadc003f687 [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
shejia01e0dd80a2021-07-12 17:47:50 +080015if (TEST_FRAMEWORK_S)
David Hu4f538e42020-11-09 16:46:17 +080016 # Secure tests are declared in this dir so that it can use the secure CPU
17 # definitions
18 add_library(tfm_s_tests INTERFACE)
shejia01e0dd80a2021-07-12 17:47:50 +080019 if (TEST_S_CRYPTO)
David Hu4f538e42020-11-09 16:46:17 +080020 add_library(tfm_test_suite_crypto_s STATIC EXCLUDE_FROM_ALL)
21 endif()
shejia01e0dd80a2021-07-12 17:47:50 +080022 if (TEST_S_ATTESTATION)
David Hu4f538e42020-11-09 16:46:17 +080023 add_library(tfm_test_suite_attestation_s STATIC EXCLUDE_FROM_ALL)
24 endif()
shejia01e0dd80a2021-07-12 17:47:50 +080025 if (TEST_S_ITS)
David Hu4f538e42020-11-09 16:46:17 +080026 add_library(tfm_test_suite_its_s STATIC EXCLUDE_FROM_ALL)
27 endif()
shejia01e0dd80a2021-07-12 17:47:50 +080028 if (TEST_S_PS)
David Hu4f538e42020-11-09 16:46:17 +080029 add_library(tfm_test_suite_ps_s STATIC EXCLUDE_FROM_ALL)
30 endif()
shejia01e0dd80a2021-07-12 17:47:50 +080031 if (TEST_S_AUDIT)
David Hu4f538e42020-11-09 16:46:17 +080032 add_library(tfm_test_suite_audit_s STATIC EXCLUDE_FROM_ALL)
33 endif()
shejia01e0dd80a2021-07-12 17:47:50 +080034 if (TEST_S_PLATFORM)
David Hu4f538e42020-11-09 16:46:17 +080035 add_library(tfm_test_suite_platform_s STATIC EXCLUDE_FROM_ALL)
36 endif()
shejia01e0dd80a2021-07-12 17:47:50 +080037 if (TEST_S_IPC)
David Hu4f538e42020-11-09 16:46:17 +080038 add_library(tfm_test_suite_ipc_s STATIC EXCLUDE_FROM_ALL)
39 endif()
shejia01e0dd80a2021-07-12 17:47:50 +080040 if (TEST_S_FWU)
Sherry Zhang92c499a2021-03-08 18:14:15 +080041 add_library(tfm_test_suite_fwu_s STATIC EXCLUDE_FROM_ALL)
42 endif()
Jianliang Shen2959c1f2021-09-01 10:14:06 +080043 if (EXTRA_S_TEST_SUITES_PATHS)
44 add_library(tfm_test_suite_extra_s STATIC EXCLUDE_FROM_ALL)
45 endif()
Raef Coles652bb8a2020-09-24 11:27:38 +010046endif()
47
shejia01e0dd80a2021-07-12 17:47:50 +080048if (TEST_NS_ATTESTATION OR TEST_S_ATTESTATION)
49 add_subdirectory(tfm_attest_test_service)
Kevin Penga8604332021-04-23 17:33:30 +080050endif()
shejia01e0dd80a2021-07-12 17:47:50 +080051
52if (TEST_NS_CORE)
53 add_subdirectory(tfm_core_test)
54 add_subdirectory(tfm_core_test_2)
Kevin Pengb0c06b42021-05-11 16:30:53 +080055endif()
shejia01e0dd80a2021-07-12 17:47:50 +080056
57if (TFM_PSA_API)
58 add_subdirectory(tfm_ipc_client)
59 add_subdirectory(tfm_ipc_service)
60endif()
61
62if (TEST_S_PS)
63 add_subdirectory(tfm_ps_test_service)
64endif()
65
66if (TEST_FRAMEWORK_S)
David Hu4f538e42020-11-09 16:46:17 +080067 add_subdirectory(tfm_secure_client_service)
68 add_subdirectory(tfm_secure_client_2)
69endif()
shejia01e0dd80a2021-07-12 17:47:50 +080070
71if (TEST_NS_SLIH_IRQ)
72 add_subdirectory(tfm_slih_test_service)
Raef Coles652bb8a2020-09-24 11:27:38 +010073endif()
shejia01e0dd80a2021-07-12 17:47:50 +080074
75if (TEST_NS_FLIH_IRQ)
76 add_subdirectory(tfm_flih_test_service)
77endif()