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 | |
David Hu | 4f538e4 | 2020-11-09 16:46:17 +0800 | [diff] [blame] | 15 | if (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 Abonyi | b4acc0f | 2020-09-28 15:18:20 +0200 | [diff] [blame] | 19 | if (TFM_PARTITION_CRYPTO OR FORWARD_PROT_MSG) |
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() |
Gabor Abonyi | b4acc0f | 2020-09-28 15:18:20 +0200 | [diff] [blame] | 22 | if (TFM_PARTITION_INITIAL_ATTESTATION OR FORWARD_PROT_MSG) |
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() |
Gabor Abonyi | b4acc0f | 2020-09-28 15:18:20 +0200 | [diff] [blame] | 25 | if(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE OR FORWARD_PROT_MSG) |
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() |
Gabor Abonyi | b4acc0f | 2020-09-28 15:18:20 +0200 | [diff] [blame] | 28 | if (TFM_PARTITION_PROTECTED_STORAGE OR FORWARD_PROT_MSG) |
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() |
| 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 Abonyi | b4acc0f | 2020-09-28 15:18:20 +0200 | [diff] [blame] | 34 | if(TFM_PARTITION_PLATFORM OR FORWARD_PROT_MSG) |
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() |
| 37 | if(TFM_PSA_API) |
| 38 | add_library(tfm_test_suite_ipc_s STATIC EXCLUDE_FROM_ALL) |
| 39 | endif() |
Sherry Zhang | a59fecd | 2021-05-24 16:37:36 +0800 | [diff] [blame] | 40 | if(TFM_PARTITION_FIRMWARE_UPDATE AND TFM_FWU_TEST_SECURE) |
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() |
Raef Coles | 652bb8a | 2020-09-24 11:27:38 +0100 | [diff] [blame] | 43 | endif() |
| 44 | |
| 45 | add_subdirectory(tfm_core_test) |
| 46 | add_subdirectory(tfm_core_test_2) |
Raef Coles | 4a72278 | 2020-10-12 10:11:18 +0100 | [diff] [blame] | 47 | if(TFM_IRQ_TEST) |
Raef Coles | ce57e06 | 2020-10-02 10:39:41 +0100 | [diff] [blame] | 48 | add_subdirectory(tfm_irq_test_service_1) |
| 49 | endif() |
Kevin Peng | a860433 | 2021-04-23 17:33:30 +0800 | [diff] [blame^] | 50 | if(TFM_ENABLE_SLIH_TEST) |
| 51 | add_subdirectory(tfm_slih_test_service) |
| 52 | endif() |
Raef Coles | 652bb8a | 2020-09-24 11:27:38 +0100 | [diff] [blame] | 53 | add_subdirectory(tfm_ps_test_service) |
David Hu | 4f538e4 | 2020-11-09 16:46:17 +0800 | [diff] [blame] | 54 | if (TEST_S) |
| 55 | add_subdirectory(tfm_secure_client_service) |
| 56 | add_subdirectory(tfm_secure_client_2) |
| 57 | endif() |
Raef Coles | 652bb8a | 2020-09-24 11:27:38 +0100 | [diff] [blame] | 58 | if(TFM_PSA_API) |
| 59 | add_subdirectory(tfm_ipc_service) |
| 60 | add_subdirectory(tfm_ipc_client) |
| 61 | endif() |
David Hu | e212bcc | 2021-06-04 22:05:30 +0800 | [diff] [blame] | 62 | add_subdirectory(tfm_attest_test_service) |