Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Gabor Toth | 6df91b5 | 2023-05-15 14:17:16 +0200 | [diff] [blame^] | 2 | # Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved. |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | #------------------------------------------------------------------------------- |
| 9 | # Define test suite to build. Used by the psa_arch_tests external component |
| 10 | # to configure what test suite gets built. |
| 11 | #------------------------------------------------------------------------------- |
| 12 | set(TS_ARCH_TEST_SUITE CRYPTO CACHE STRING "Arch test suite") |
| 13 | |
| 14 | #------------------------------------------------------------------------------- |
Julian Hall | c635094 | 2021-07-21 12:08:09 +0100 | [diff] [blame] | 15 | # Extend the arch test build configuration to include tests missing from the |
| 16 | # default configuration. |
| 17 | #------------------------------------------------------------------------------- |
Julian Hall | c1f8b6e | 2021-08-06 15:21:21 +0100 | [diff] [blame] | 18 | list(APPEND PSA_ARCH_TEST_EXTERNAL_DEFS |
| 19 | -DCRYPTO_1_0) |
Julian Hall | c635094 | 2021-07-21 12:08:09 +0100 | [diff] [blame] | 20 | |
| 21 | #------------------------------------------------------------------------------- |
Julian Hall | b57aa0d | 2021-07-13 10:34:59 +0100 | [diff] [blame] | 22 | # The arch test build system puts its build output under a test suite specific |
| 23 | # subdirectory. The subdirectory name is different from the test suite name |
| 24 | # so an additional define is needed to obtain the built library. |
| 25 | #------------------------------------------------------------------------------- |
| 26 | set(TS_ARCH_TEST_BUILD_SUBDIR crypto CACHE STRING "Arch test build subdirectory") |
| 27 | |
| 28 | #------------------------------------------------------------------------------- |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 29 | # Crypto specific components |
| 30 | # |
| 31 | #------------------------------------------------------------------------------- |
Gabor Toth | 6df91b5 | 2023-05-15 14:17:16 +0200 | [diff] [blame^] | 32 | target_sources(${PROJECT_NAME} PRIVATE |
| 33 | ${TS_ROOT}/deployments/psa-api-test/crypto/crypto.c |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 34 | ) |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 35 | |
Gabor Toth | 6df91b5 | 2023-05-15 14:17:16 +0200 | [diff] [blame^] | 36 | add_components(TARGET ${PROJECT_NAME} |
| 37 | BASE_DIR ${TS_ROOT} |
| 38 | COMPONENTS |
| 39 | "components/service/common/include" |
| 40 | "components/service/crypto/include" |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 41 | ) |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 42 | |
Julian Hall | b57aa0d | 2021-07-13 10:34:59 +0100 | [diff] [blame] | 43 | #------------------------------------------------------------------------------- |
| 44 | # Advertise PSA API include paths to PSA Arch tests |
| 45 | # |
| 46 | #------------------------------------------------------------------------------- |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 47 | list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${PSA_CRYPTO_API_INCLUDE}) |
| 48 | |
| 49 | #------------------------------------------------------------------------------- |
| 50 | # Extend with components that are common across all deployments of |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 51 | # psa-api-test |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 52 | #------------------------------------------------------------------------------- |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 53 | include(../../psa-api-test.cmake REQUIRED) |