blob: 130d82b6f62b7da694635237bf0606ede966ce40 [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"
julhal012c18fbf2021-02-01 08:29:28 +000023 "components/config/ramstore"
24 "components/config/ramstore/test"
Julian Halleff4b282020-11-23 18:24:12 +010025 "components/rpc/common/caller"
26 "components/rpc/common/interface"
julhal01734dbad2020-12-21 10:27:41 +000027 "components/rpc/common/test/protocol"
Julian Halleff4b282020-11-23 18:24:12 +010028 "components/rpc/direct"
29 "components/rpc/dummy"
30 "components/service/common"
31 "components/service/common/serializer/protobuf"
32 "components/service/common/provider"
33 "components/service/common/provider/test"
34 "components/service/locator"
35 "components/service/locator/interface"
36 "components/service/locator/test"
37 "components/service/locator/standalone"
38 "components/service/locator/standalone/services/crypto"
julhal013ec4c322021-02-05 17:30:49 +000039 "components/service/locator/standalone/services/test-runner"
Julian Halleff4b282020-11-23 18:24:12 +010040 "components/service/crypto/client/cpp"
julhal01734dbad2020-12-21 10:27:41 +000041 "components/service/crypto/client/cpp/protobuf"
42 "components/service/crypto/client/cpp/packed-c"
Julian Halleff4b282020-11-23 18:24:12 +010043 "components/service/crypto/client/test"
44 "components/service/crypto/client/test/standalone"
45 "components/service/crypto/provider/mbedcrypto"
Julian Halleff4b282020-11-23 18:24:12 +010046 "components/service/crypto/provider/serializer/protobuf"
julhal01734dbad2020-12-21 10:27:41 +000047 "components/service/crypto/provider/serializer/packed-c"
Julian Halleff4b282020-11-23 18:24:12 +010048 "components/service/crypto/test/unit"
49 "components/service/crypto/test/service"
julhal01734dbad2020-12-21 10:27:41 +000050 "components/service/crypto/test/service/protobuf"
51 "components/service/crypto/test/service/packed-c"
52 "components/service/crypto/test/protocol"
julhal011260f102021-02-15 17:34:08 +000053 "components/service/secure_storage/frontend/psa/its"
julhal017791cb12021-03-03 09:21:27 +000054 "components/service/secure_storage/frontend/psa/its/test"
55 "components/service/secure_storage/frontend/psa/ps"
56 "components/service/secure_storage/frontend/psa/ps/test"
julhal011260f102021-02-15 17:34:08 +000057 "components/service/secure_storage/frontend/secure_storage_provider"
58 "components/service/secure_storage/backend/secure_storage_client"
julhal017791cb12021-03-03 09:21:27 +000059 "components/service/secure_storage/backend/secure_storage_client/test"
julhal011260f102021-02-15 17:34:08 +000060 "components/service/secure_storage/backend/mock_store"
julhal017791cb12021-03-03 09:21:27 +000061 "components/service/secure_storage/backend/mock_store/test"
julhal011260f102021-02-15 17:34:08 +000062 "components/service/secure_storage/backend/secure_flash_store"
julhal017791cb12021-03-03 09:21:27 +000063 "components/service/secure_storage/backend/secure_flash_store/test"
julhal011260f102021-02-15 17:34:08 +000064 "components/service/secure_storage/backend/secure_flash_store/flash_fs"
65 "components/service/secure_storage/backend/secure_flash_store/flash"
julhal013ec4c322021-02-05 17:30:49 +000066 "components/service/test_runner/provider"
67 "components/service/test_runner/provider/serializer/packed-c"
68 "components/service/test_runner/provider/backend/null"
Julian Halleff4b282020-11-23 18:24:12 +010069 "protocols/rpc/common/protobuf"
70 "protocols/rpc/common/packed-c"
Julian Halleff4b282020-11-23 18:24:12 +010071 "protocols/service/crypto/packed-c"
72 "protocols/service/crypto/protobuf"
73 "protocols/service/secure_storage/packed-c"
74)
75
76#-------------------------------------------------------------------------------
77# Components used from external projects
78#
79#-------------------------------------------------------------------------------
80
Julian Halleff4b282020-11-23 18:24:12 +010081# Nanopb
82include(${TS_ROOT}/external/nanopb/nanopb.cmake)
83target_link_libraries(component-test PRIVATE nanopb::protobuf-nanopb-static)
84protobuf_generate_all(TGT "component-test" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols")
85
86# Mbedcrypto
87include(${TS_ROOT}/external/mbed-crypto/mbedcrypto.cmake)
88target_link_libraries(component-test PRIVATE mbedcrypto)
89
90#-------------------------------------------------------------------------------
91# Define install content.
92#
93#-------------------------------------------------------------------------------
94if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
95 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
96endif()
Gyorgy Szingc31afbf2021-02-12 01:51:55 +010097install(TARGETS component-test DESTINATION ${TS_ENV}/bin)