blob: 7d12298b5deb1271a5d60a8fc415aeeb7d944128 [file] [log] [blame]
Julian Halleff4b282020-11-23 18:24:12 +01001#-------------------------------------------------------------------------------
Gyorgy Szingc31afbf2021-02-12 01:51:55 +01002# Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
Julian Halleff4b282020-11-23 18:24:12 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
8#-------------------------------------------------------------------------------
9# The base build file shared between deployments of 'component-test' for
10# different environments. Used for running standalone component tests
11# contained within a single executable.
12#-------------------------------------------------------------------------------
13add_components(
14 TARGET "component-test"
15 BASE_DIR ${TS_ROOT}
16 COMPONENTS
Julian Halleff4b282020-11-23 18:24:12 +010017 "components/app/ts-demo"
18 "components/app/ts-demo/test"
19 "components/common/uuid"
20 "components/common/uuid/test"
julhal01734dbad2020-12-21 10:27:41 +000021 "components/common/tlv"
22 "components/common/tlv/test"
Julian Hall201ce462021-04-29 11:05:34 +010023 "components/common/endian"
24 "components/common/endian/test"
julhal012c18fbf2021-02-01 08:29:28 +000025 "components/config/ramstore"
26 "components/config/ramstore/test"
Julian Halleff4b282020-11-23 18:24:12 +010027 "components/rpc/common/caller"
28 "components/rpc/common/interface"
Julian Halla6b3e1c2021-06-25 10:15:01 +010029 "components/rpc/common/demux"
julhal01734dbad2020-12-21 10:27:41 +000030 "components/rpc/common/test/protocol"
Julian Halleff4b282020-11-23 18:24:12 +010031 "components/rpc/direct"
32 "components/rpc/dummy"
Julian Halla7e76c82021-04-14 11:12:11 +010033 "components/service/common/include"
Julian Halleff4b282020-11-23 18:24:12 +010034 "components/service/common/serializer/protobuf"
35 "components/service/common/provider"
36 "components/service/common/provider/test"
37 "components/service/locator"
38 "components/service/locator/interface"
39 "components/service/locator/test"
40 "components/service/locator/standalone"
41 "components/service/locator/standalone/services/crypto"
julhal013a4207d2021-03-08 13:32:08 +000042 "components/service/locator/standalone/services/internal-trusted-storage"
43 "components/service/locator/standalone/services/protected-storage"
julhal013ec4c322021-02-05 17:30:49 +000044 "components/service/locator/standalone/services/test-runner"
Julian Hall700aa362021-05-13 15:30:39 +010045 "components/service/locator/standalone/services/attestation"
46 "components/service/attestation/include"
Julian Hall1d313022021-05-07 14:27:55 +010047 "components/service/attestation/claims"
Julian Hall04464912021-05-18 15:32:49 +010048 "components/service/attestation/claims/sources/boot_seed_generator"
49 "components/service/attestation/claims/sources/null_lifecycle"
50 "components/service/attestation/claims/sources/instance_id"
Julian Hall201ce462021-04-29 11:05:34 +010051 "components/service/attestation/claims/sources/event_log"
Julian Hall1d313022021-05-07 14:27:55 +010052 "components/service/attestation/claims/sources/event_log/mock"
Julian Hall201ce462021-04-29 11:05:34 +010053 "components/service/attestation/claims/sources/event_log/test"
Julian Hall644b57a2021-06-30 08:45:19 +010054 "components/service/attestation/reporter/local"
55 "components/service/attestation/reporter/eat"
Julian Hall4834e632021-05-26 15:33:06 +010056 "components/service/attestation/reporter/dump/raw"
Julian Hall644b57a2021-06-30 08:45:19 +010057 "components/service/attestation/key_mngr/local"
Julian Hall700aa362021-05-13 15:30:39 +010058 "components/service/attestation/provider"
59 "components/service/attestation/provider/serializer/packed-c"
60 "components/service/attestation/client/psa"
Julian Hall482fd2f2021-05-17 16:34:48 +010061 "components/service/attestation/client/provision"
Julian Hall1d313022021-05-07 14:27:55 +010062 "components/service/attestation/test/component"
Julian Hall700aa362021-05-13 15:30:39 +010063 "components/service/attestation/test/service"
Julian Halleff4b282020-11-23 18:24:12 +010064 "components/service/crypto/client/cpp"
julhal01734dbad2020-12-21 10:27:41 +000065 "components/service/crypto/client/cpp/protobuf"
66 "components/service/crypto/client/cpp/packed-c"
Julian Halleff4b282020-11-23 18:24:12 +010067 "components/service/crypto/client/test"
68 "components/service/crypto/client/test/standalone"
Julian Hall9061e6c2021-06-29 14:24:20 +010069 "components/service/crypto/provider"
Julian Halleff4b282020-11-23 18:24:12 +010070 "components/service/crypto/provider/serializer/protobuf"
julhal01734dbad2020-12-21 10:27:41 +000071 "components/service/crypto/provider/serializer/packed-c"
Julian Hall7bfb18e2021-07-13 15:48:13 +010072 "components/service/crypto/provider/extension/hash"
73 "components/service/crypto/provider/extension/hash/serializer/packed-c"
Julian Halle7bccbe2021-07-16 09:50:34 +010074 "components/service/crypto/provider/extension/cipher"
75 "components/service/crypto/provider/extension/cipher/serializer/packed-c"
Julian Hall9061e6c2021-06-29 14:24:20 +010076 "components/service/crypto/provider/test"
77 "components/service/crypto/backend/mbedcrypto"
Julian Hall7bfb18e2021-07-13 15:48:13 +010078 "components/service/crypto/factory/full"
Julian Halleff4b282020-11-23 18:24:12 +010079 "components/service/crypto/test/unit"
80 "components/service/crypto/test/service"
julhal01734dbad2020-12-21 10:27:41 +000081 "components/service/crypto/test/service/protobuf"
82 "components/service/crypto/test/service/packed-c"
83 "components/service/crypto/test/protocol"
Julian Halla7e76c82021-04-14 11:12:11 +010084 "components/service/secure_storage/include"
julhal011260f102021-02-15 17:34:08 +000085 "components/service/secure_storage/frontend/psa/its"
julhal017791cb12021-03-03 09:21:27 +000086 "components/service/secure_storage/frontend/psa/its/test"
87 "components/service/secure_storage/frontend/psa/ps"
88 "components/service/secure_storage/frontend/psa/ps/test"
julhal011260f102021-02-15 17:34:08 +000089 "components/service/secure_storage/frontend/secure_storage_provider"
90 "components/service/secure_storage/backend/secure_storage_client"
julhal017791cb12021-03-03 09:21:27 +000091 "components/service/secure_storage/backend/secure_storage_client/test"
julhal013a4207d2021-03-08 13:32:08 +000092 "components/service/secure_storage/backend/null_store"
julhal011260f102021-02-15 17:34:08 +000093 "components/service/secure_storage/backend/mock_store"
julhal017791cb12021-03-03 09:21:27 +000094 "components/service/secure_storage/backend/mock_store/test"
julhal011260f102021-02-15 17:34:08 +000095 "components/service/secure_storage/backend/secure_flash_store"
julhal017791cb12021-03-03 09:21:27 +000096 "components/service/secure_storage/backend/secure_flash_store/test"
julhal011260f102021-02-15 17:34:08 +000097 "components/service/secure_storage/backend/secure_flash_store/flash_fs"
98 "components/service/secure_storage/backend/secure_flash_store/flash"
julhal013ec4c322021-02-05 17:30:49 +000099 "components/service/test_runner/provider"
100 "components/service/test_runner/provider/serializer/packed-c"
101 "components/service/test_runner/provider/backend/null"
Julian Halleff4b282020-11-23 18:24:12 +0100102 "protocols/rpc/common/protobuf"
103 "protocols/rpc/common/packed-c"
Julian Halleff4b282020-11-23 18:24:12 +0100104 "protocols/service/crypto/packed-c"
105 "protocols/service/crypto/protobuf"
106 "protocols/service/secure_storage/packed-c"
107)
108
109#-------------------------------------------------------------------------------
110# Components used from external projects
111#
112#-------------------------------------------------------------------------------
113
Julian Halleff4b282020-11-23 18:24:12 +0100114# Nanopb
115include(${TS_ROOT}/external/nanopb/nanopb.cmake)
116target_link_libraries(component-test PRIVATE nanopb::protobuf-nanopb-static)
117protobuf_generate_all(TGT "component-test" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols")
118
Balint Dobszay3c52ce62021-05-10 16:27:18 +0200119# Mbed TLS provides libmbedcrypto
120include(${TS_ROOT}/external/MbedTLS/MbedTLS.cmake)
Julian Halleff4b282020-11-23 18:24:12 +0100121target_link_libraries(component-test PRIVATE mbedcrypto)
122
Julian Hall201ce462021-04-29 11:05:34 +0100123# Qcbor
124include(${TS_ROOT}/external/qcbor/qcbor.cmake)
125target_link_libraries(component-test PRIVATE qcbor)
126
Julian Hall827d4472021-05-11 11:31:37 +0100127# t_cose
128include(${TS_ROOT}/external/t_cose/t_cose.cmake)
129target_link_libraries(component-test PRIVATE t_cose)
130
Julian Halleff4b282020-11-23 18:24:12 +0100131#-------------------------------------------------------------------------------
132# Define install content.
133#
134#-------------------------------------------------------------------------------
135if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
136 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
137endif()
Gyorgy Szingc31afbf2021-02-12 01:51:55 +0100138install(TARGETS component-test DESTINATION ${TS_ENV}/bin)