Raef Coles | 652bb8a | 2020-09-24 11:27:38 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Sherry Zhang | 92c499a | 2021-03-08 18:14:15 +0800 | [diff] [blame] | 2 | # Copyright (c) 2020-2021, Arm Limited. All rights reserved. |
Raef Coles | 652bb8a | 2020-09-24 11:27:38 +0100 | [diff] [blame] | 3 | # |
| 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 |
| 10 | if (TFM_MULTI_CORE_TOPOLOGY) |
| 11 | include(${CMAKE_SOURCE_DIR}/platform/ext/target/${TFM_PLATFORM}/preload.cmake) |
Raef Coles | 34cffa7 | 2020-10-28 10:27:19 +0000 | [diff] [blame] | 12 | tfm_toolchain_reload_compiler() |
Raef Coles | 652bb8a | 2020-09-24 11:27:38 +0100 | [diff] [blame] | 13 | endif() |
| 14 | |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 15 | if (TEST_FRAMEWORK_S) |
David Hu | 4f538e4 | 2020-11-09 16:46:17 +0800 | [diff] [blame] | 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) |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 19 | if (TEST_S_CRYPTO) |
David Hu | 4f538e4 | 2020-11-09 16:46:17 +0800 | [diff] [blame] | 20 | add_library(tfm_test_suite_crypto_s STATIC EXCLUDE_FROM_ALL) |
| 21 | endif() |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 22 | if (TEST_S_ATTESTATION) |
David Hu | 4f538e4 | 2020-11-09 16:46:17 +0800 | [diff] [blame] | 23 | add_library(tfm_test_suite_attestation_s STATIC EXCLUDE_FROM_ALL) |
| 24 | endif() |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 25 | if (TEST_S_ITS) |
David Hu | 4f538e4 | 2020-11-09 16:46:17 +0800 | [diff] [blame] | 26 | add_library(tfm_test_suite_its_s STATIC EXCLUDE_FROM_ALL) |
| 27 | endif() |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 28 | if (TEST_S_PS) |
David Hu | 4f538e4 | 2020-11-09 16:46:17 +0800 | [diff] [blame] | 29 | add_library(tfm_test_suite_ps_s STATIC EXCLUDE_FROM_ALL) |
| 30 | endif() |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 31 | if (TEST_S_AUDIT) |
David Hu | 4f538e4 | 2020-11-09 16:46:17 +0800 | [diff] [blame] | 32 | add_library(tfm_test_suite_audit_s STATIC EXCLUDE_FROM_ALL) |
| 33 | endif() |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 34 | if (TEST_S_PLATFORM) |
David Hu | 4f538e4 | 2020-11-09 16:46:17 +0800 | [diff] [blame] | 35 | add_library(tfm_test_suite_platform_s STATIC EXCLUDE_FROM_ALL) |
| 36 | endif() |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 37 | if (TEST_S_IPC) |
David Hu | 4f538e4 | 2020-11-09 16:46:17 +0800 | [diff] [blame] | 38 | add_library(tfm_test_suite_ipc_s STATIC EXCLUDE_FROM_ALL) |
| 39 | endif() |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 40 | if (TEST_S_FWU) |
Sherry Zhang | 92c499a | 2021-03-08 18:14:15 +0800 | [diff] [blame] | 41 | add_library(tfm_test_suite_fwu_s STATIC EXCLUDE_FROM_ALL) |
| 42 | endif() |
Jianliang Shen | 2959c1f | 2021-09-01 10:14:06 +0800 | [diff] [blame] | 43 | if (EXTRA_S_TEST_SUITES_PATHS) |
| 44 | add_library(tfm_test_suite_extra_s STATIC EXCLUDE_FROM_ALL) |
| 45 | endif() |
Raef Coles | 652bb8a | 2020-09-24 11:27:38 +0100 | [diff] [blame] | 46 | endif() |
| 47 | |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 48 | if (TEST_NS_ATTESTATION OR TEST_S_ATTESTATION) |
| 49 | add_subdirectory(tfm_attest_test_service) |
Kevin Peng | a860433 | 2021-04-23 17:33:30 +0800 | [diff] [blame] | 50 | endif() |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 51 | |
| 52 | if (TEST_NS_CORE) |
| 53 | add_subdirectory(tfm_core_test) |
| 54 | add_subdirectory(tfm_core_test_2) |
Kevin Peng | b0c06b4 | 2021-05-11 16:30:53 +0800 | [diff] [blame] | 55 | endif() |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 56 | |
| 57 | if (TFM_PSA_API) |
| 58 | add_subdirectory(tfm_ipc_client) |
| 59 | add_subdirectory(tfm_ipc_service) |
| 60 | endif() |
| 61 | |
| 62 | if (TEST_S_PS) |
| 63 | add_subdirectory(tfm_ps_test_service) |
| 64 | endif() |
| 65 | |
| 66 | if (TEST_FRAMEWORK_S) |
David Hu | 4f538e4 | 2020-11-09 16:46:17 +0800 | [diff] [blame] | 67 | add_subdirectory(tfm_secure_client_service) |
| 68 | add_subdirectory(tfm_secure_client_2) |
| 69 | endif() |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 70 | |
| 71 | if (TEST_NS_SLIH_IRQ) |
| 72 | add_subdirectory(tfm_slih_test_service) |
Raef Coles | 652bb8a | 2020-09-24 11:27:38 +0100 | [diff] [blame] | 73 | endif() |
shejia01 | e0dd80a | 2021-07-12 17:47:50 +0800 | [diff] [blame] | 74 | |
| 75 | if (TEST_NS_FLIH_IRQ) |
| 76 | add_subdirectory(tfm_flih_test_service) |
| 77 | endif() |