Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. |
| 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 | #------------------------------------------------------------------------------- |
| 18 | #set(TS_ARCH_TEST_EXTERNAL_DEFS |
| 19 | # -DCRYPTO_1_0 |
| 20 | # CACHE STRING "Arch test external defines") |
| 21 | |
| 22 | #------------------------------------------------------------------------------- |
Julian Hall | b57aa0d | 2021-07-13 10:34:59 +0100 | [diff] [blame] | 23 | # The arch test build system puts its build output under a test suite specific |
| 24 | # subdirectory. The subdirectory name is different from the test suite name |
| 25 | # so an additional define is needed to obtain the built library. |
| 26 | #------------------------------------------------------------------------------- |
| 27 | set(TS_ARCH_TEST_BUILD_SUBDIR crypto CACHE STRING "Arch test build subdirectory") |
| 28 | |
| 29 | #------------------------------------------------------------------------------- |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 30 | # Crypto specific components |
| 31 | # |
| 32 | #------------------------------------------------------------------------------- |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 33 | add_components( |
| 34 | TARGET "psa-api-test" |
| 35 | BASE_DIR ${TS_ROOT} |
| 36 | COMPONENTS |
| 37 | "components/service/crypto/include" |
| 38 | "components/service/crypto/client/psa" |
| 39 | ) |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 40 | |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 41 | target_sources(psa-api-test PRIVATE |
| 42 | ${TS_ROOT}/deployments/psa-api-test/crypto/crypto_locator.c |
| 43 | ) |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 44 | |
Julian Hall | b57aa0d | 2021-07-13 10:34:59 +0100 | [diff] [blame] | 45 | #------------------------------------------------------------------------------- |
| 46 | # Advertise PSA API include paths to PSA Arch tests |
| 47 | # |
| 48 | #------------------------------------------------------------------------------- |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 49 | list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${PSA_CRYPTO_API_INCLUDE}) |
| 50 | |
| 51 | #------------------------------------------------------------------------------- |
| 52 | # Extend with components that are common across all deployments of |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 53 | # psa-api-test |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 54 | #------------------------------------------------------------------------------- |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 55 | include(../../psa-api-test.cmake REQUIRED) |