blob: 558d0578cf6149eac8958e0cff39169c05bcaa8c [file] [log] [blame]
Julian Halldd296222021-05-27 15:31:32 +01001#-------------------------------------------------------------------------------
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#-------------------------------------------------------------------------------
12set(TS_ARCH_TEST_SUITE CRYPTO CACHE STRING "Arch test suite")
13
14#-------------------------------------------------------------------------------
Julian Hallc6350942021-07-21 12:08:09 +010015# Extend the arch test build configuration to include tests missing from the
16# default configuration.
17#-------------------------------------------------------------------------------
Julian Hallc1f8b6e2021-08-06 15:21:21 +010018list(APPEND PSA_ARCH_TEST_EXTERNAL_DEFS
19 -DCRYPTO_1_0)
Julian Hallc6350942021-07-21 12:08:09 +010020
21#-------------------------------------------------------------------------------
Julian Hallb57aa0d2021-07-13 10:34:59 +010022# 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#-------------------------------------------------------------------------------
26set(TS_ARCH_TEST_BUILD_SUBDIR crypto CACHE STRING "Arch test build subdirectory")
27
28#-------------------------------------------------------------------------------
Julian Halldd296222021-05-27 15:31:32 +010029# Crypto specific components
30#
31#-------------------------------------------------------------------------------
Julian Halld4071382021-07-07 16:45:53 +010032add_components(
33 TARGET "psa-api-test"
34 BASE_DIR ${TS_ROOT}
35 COMPONENTS
36 "components/service/crypto/include"
37 "components/service/crypto/client/psa"
38)
Julian Halldd296222021-05-27 15:31:32 +010039
Julian Halld4071382021-07-07 16:45:53 +010040target_sources(psa-api-test PRIVATE
41 ${TS_ROOT}/deployments/psa-api-test/crypto/crypto_locator.c
42)
Julian Halldd296222021-05-27 15:31:32 +010043
Julian Hallb57aa0d2021-07-13 10:34:59 +010044#-------------------------------------------------------------------------------
45# Advertise PSA API include paths to PSA Arch tests
46#
47#-------------------------------------------------------------------------------
Julian Halldd296222021-05-27 15:31:32 +010048list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${PSA_CRYPTO_API_INCLUDE})
49
50#-------------------------------------------------------------------------------
51# Extend with components that are common across all deployments of
Julian Halld4071382021-07-07 16:45:53 +010052# psa-api-test
Julian Halldd296222021-05-27 15:31:32 +010053#-------------------------------------------------------------------------------
Julian Halld4071382021-07-07 16:45:53 +010054include(../../psa-api-test.cmake REQUIRED)