Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Gyorgy Szing | ec62ea7 | 2022-07-20 12:36:52 +0000 | [diff] [blame^] | 2 | # Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved. |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | #------------------------------------------------------------------------------- |
| 9 | # The base build file shared between deployments of 'ts-service-test' for |
| 10 | # different environments. Used for running end-to-end service-level tests |
Gyorgy Szing | ec62ea7 | 2022-07-20 12:36:52 +0000 | [diff] [blame^] | 11 | # where test cases exercise trusted service client interfaces. |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 12 | #------------------------------------------------------------------------------- |
| 13 | |
| 14 | #------------------------------------------------------------------------------- |
| 15 | # Use libts for locating and accessing services. An appropriate version of |
Gyorgy Szing | ec62ea7 | 2022-07-20 12:36:52 +0000 | [diff] [blame^] | 16 | # libts will be imported for the environment in which service tests are |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 17 | # deployed. |
| 18 | #------------------------------------------------------------------------------- |
| 19 | include(${TS_ROOT}/deployments/libts/libts-import.cmake) |
Gyorgy Szing | ec62ea7 | 2022-07-20 12:36:52 +0000 | [diff] [blame^] | 20 | target_link_libraries(ts-service-test PRIVATE libts::ts) |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 21 | |
| 22 | #------------------------------------------------------------------------------- |
Gyorgy Szing | ec62ea7 | 2022-07-20 12:36:52 +0000 | [diff] [blame^] | 23 | # Components that are common across all deployments |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 24 | # |
| 25 | #------------------------------------------------------------------------------- |
| 26 | add_components( |
| 27 | TARGET "ts-service-test" |
| 28 | BASE_DIR ${TS_ROOT} |
| 29 | COMPONENTS |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame] | 30 | "components/common/tlv" |
Julian Hall | 99a57e3 | 2021-07-28 14:18:50 +0100 | [diff] [blame] | 31 | "components/service/common/client" |
Julian Hall | a7e76c8 | 2021-04-14 11:12:11 +0100 | [diff] [blame] | 32 | "components/service/common/include" |
Julian Hall | 3e61454 | 2021-07-29 11:47:47 +0100 | [diff] [blame] | 33 | "components/service/discovery/client" |
| 34 | "components/service/discovery/test/service" |
Julian Hall | a7e76c8 | 2021-04-14 11:12:11 +0100 | [diff] [blame] | 35 | "components/service/crypto/include" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 36 | "components/service/crypto/test/service" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame] | 37 | "components/service/crypto/test/service/protobuf" |
| 38 | "components/service/crypto/test/service/packed-c" |
Julian Hall | c6e7a8a | 2021-08-09 14:28:13 +0100 | [diff] [blame] | 39 | "components/service/crypto/test/service/extension/hash" |
| 40 | "components/service/crypto/test/service/extension/hash/packed-c" |
Julian Hall | a652ad6 | 2021-08-10 12:05:46 +0100 | [diff] [blame] | 41 | "components/service/crypto/test/service/extension/cipher" |
| 42 | "components/service/crypto/test/service/extension/cipher/packed-c" |
Julian Hall | cb11ba5 | 2021-08-10 15:41:06 +0100 | [diff] [blame] | 43 | "components/service/crypto/test/service/extension/mac" |
| 44 | "components/service/crypto/test/service/extension/mac/packed-c" |
Julian Hall | e656944 | 2021-08-11 11:07:24 +0100 | [diff] [blame] | 45 | "components/service/crypto/test/service/extension/key_derivation" |
| 46 | "components/service/crypto/test/service/extension/key_derivation/packed-c" |
Julian Hall | a7e76c8 | 2021-04-14 11:12:11 +0100 | [diff] [blame] | 47 | "components/service/crypto/client/psa" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 48 | "components/service/crypto/client/cpp" |
Julian Hall | 7a70340 | 2021-08-04 09:20:43 +0100 | [diff] [blame] | 49 | "components/service/crypto/client/cpp/protocol/protobuf" |
| 50 | "components/service/crypto/client/cpp/protocol/packed-c" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 51 | "components/service/common/serializer/protobuf" |
Julian Hall | caa4af8 | 2021-05-19 12:02:36 +0100 | [diff] [blame] | 52 | "components/service/attestation/include" |
| 53 | "components/service/attestation/client/psa" |
| 54 | "components/service/attestation/client/provision" |
| 55 | "components/service/attestation/test/service" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 56 | "protocols/service/crypto/protobuf" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame] | 57 | "protocols/service/crypto/packed-c" |
Julian Hall | a7e76c8 | 2021-04-14 11:12:11 +0100 | [diff] [blame] | 58 | "components/service/secure_storage/include" |
julhal01 | 3a4207d | 2021-03-08 13:32:08 +0000 | [diff] [blame] | 59 | "components/service/secure_storage/test/service" |
| 60 | "components/service/secure_storage/frontend/psa/its" |
| 61 | "components/service/secure_storage/frontend/psa/its/test" |
| 62 | "components/service/secure_storage/frontend/psa/ps" |
| 63 | "components/service/secure_storage/frontend/psa/ps/test" |
| 64 | "components/service/secure_storage/backend/secure_storage_client" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 65 | ) |
| 66 | |
| 67 | #------------------------------------------------------------------------------- |
| 68 | # Components used from external projects |
| 69 | # |
| 70 | #------------------------------------------------------------------------------- |
| 71 | |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 72 | # Nanopb |
| 73 | include(${TS_ROOT}/external/nanopb/nanopb.cmake) |
| 74 | target_link_libraries(ts-service-test PRIVATE nanopb::protobuf-nanopb-static) |
| 75 | protobuf_generate_all(TGT "ts-service-test" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols") |
| 76 | |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 77 | #------------------------------------------------------------------------------- |
| 78 | # Define install content. |
| 79 | # |
| 80 | #------------------------------------------------------------------------------- |
| 81 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 82 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 83 | endif() |
Gyorgy Szing | c31afbf | 2021-02-12 01:51:55 +0100 | [diff] [blame] | 84 | install(TARGETS ts-service-test RUNTIME DESTINATION ${TS_ENV}/bin) |