blob: 471463974308355a743f2f3f6af5a8b08a72296c [file] [log] [blame]
David Hu479ef002023-10-20 14:44:32 +08001#-------------------------------------------------------------------------------
2# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
3# Copyright (c) 2022 Cypress Semiconductor Corporation (an Infineon company)
4# or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
5#
6# SPDX-License-Identifier: BSD-3-Clause
7#
8#-------------------------------------------------------------------------------
9
10include(utils)
11 dump_options("TEST Configuration"
12 "
13 TEST_NS;
14 TEST_S;
15 TEST_NS_ATTESTATION;
16 TEST_NS_CRYPTO;
17 TEST_NS_ITS;
18 TEST_NS_PS;
19 TEST_NS_QCBOR;
20 TEST_NS_T_COSE;
21 TEST_NS_PLATFORM;
22 TEST_NS_FWU;
23 TEST_NS_IPC;
24 TEST_NS_SLIH_IRQ;
25 TEST_NS_FLIH_IRQ;
26 TEST_NS_MULTI_CORE;
27 TEST_NS_MANAGE_NSID;
28 TEST_NS_SFN_BACKEND;
29 TEST_NS_FPU;
30 TEST_S_ATTESTATION;
31 TEST_S_CRYPTO;
32 TEST_S_ITS;
33 TEST_S_PS;
34 TEST_S_PLATFORM;
35 TEST_S_FWU;
36 TEST_S_IPC;
37 TEST_S_SFN_BACKEND;
38 TEST_S_FPU;
39 "
40 )
41
42add_library(tfm_test_framework_s INTERFACE)
43add_library(tfm_s_tests STATIC)
44
45target_link_libraries(tfm_test_framework_s
46 INTERFACE
47 psa_interface
48 tfm_test_framework_common
49 tfm_sprt
50 tfm_config
51)
52
53target_compile_definitions(tfm_test_framework_s
54 INTERFACE
55 USE_SP_LOG
56)
57
58target_sources(tfm_s_tests
59 PRIVATE
60 ${CMAKE_CURRENT_LIST_DIR}/secure_suites.c
61)
62
63target_link_libraries(tfm_s_tests
64 PUBLIC
65 tfm_test_framework_s
66 tfm_config
67 tfm_spm
68)
69
70target_compile_definitions(tfm_s_tests
71 PRIVATE
72 $<$<BOOL:${PS_TEST_NV_COUNTERS}>:PS_TEST_NV_COUNTERS>
73)
74
75include(test_suite_utils)
76
77# A temporary workaround:
78# Temporarily disable Non-secure regression test flags to build NS test suites.
79#
80# Alternatively, CMake files in test suites can be seperated into secure ones and non-secure ones.
81pre_secure_suite_build()
82add_subdirectory(${SECURE_FW_REG_DIR}/suites
83 ${CMAKE_CURRENT_BINARY_DIR}/secure_fw/suites
84)
85# Recover Non-secure regression test filgs.
86post_secure_suite_build()