1#------------------------------------------------------------------------------- 2# Copyright (c) 2021-2023, 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 INITIAL_ATTESTATION CACHE STRING "Arch test suite") 13 14#------------------------------------------------------------------------------- 15# Set additional defines needed for build. 16#------------------------------------------------------------------------------- 17list(APPEND PSA_ARCH_TEST_EXTERNAL_DEFS 18 -DPSA_ALG_MD4=0x02000002 -DPLATFORM_HAS_ATTEST_PK) 19 20#------------------------------------------------------------------------------- 21# The arch test build system puts its build output under a test suite specific 22# subdirectory. The subdirectory name is different from the test suite name 23# so an additional define is needed to obtain the built library. 24#------------------------------------------------------------------------------- 25set(TS_ARCH_TEST_BUILD_SUBDIR initial_attestation CACHE STRING "Arch test build subdirectory") 26 27#------------------------------------------------------------------------------- 28# Attestation specific components. 29# 30#------------------------------------------------------------------------------- 31target_sources(${PROJECT_NAME} PRIVATE 32 ${TS_ROOT}/deployments/psa-api-test/initial_attestation/iat.c 33) 34 35add_components(TARGET ${PROJECT_NAME} 36 BASE_DIR ${TS_ROOT} 37 COMPONENTS 38 "components/service/common/include" 39 "components/service/attestation/include" 40 "components/service/crypto/include" 41) 42 43# Use Mbed TLS to provide the psa crypto api interface files 44set(PSA_CRYPTO_API_INCLUDE ${MBEDTLS_PUBLIC_INCLUDE_PATH}) 45 46#------------------------------------------------------------------------------- 47# Advertise PSA API include paths to PSA Arch tests 48# 49#------------------------------------------------------------------------------- 50list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${PSA_CRYPTO_API_INCLUDE}) 51list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${PSA_ATTESTATION_API_INCLUDE}) 52list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${PSA_COMMON_INCLUDE}) 53 54#------------------------------------------------------------------------------- 55# Extend with components that are common across all deployments of 56# psa-api-test 57#------------------------------------------------------------------------------- 58include(../../psa-api-test.cmake REQUIRED) 59