blob: 5de9dc787611354f177428f5e4283b4257d749e7 [file] [log] [blame]
Manuel Pégourié-Gonnard8bcad482024-10-23 10:41:15 +02001# components-build-system.sh
2#
3# Copyright The Mbed TLS Contributors
4# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
5
6# This file contains test components that are executed by all.sh
7
8################################################################
9#### Build System Testing
10################################################################
11
Ronald Cron13a7cce2024-11-05 10:20:16 +010012component_test_tf_psa_crypto_cmake_out_of_source () {
Manuel Pégourié-Gonnard8bcad482024-10-23 10:41:15 +020013 msg "build: cmake tf-psa-crypto 'out-of-source' build"
14 TF_PSA_CRYPTO_ROOT_DIR="$PWD"
15 mkdir "$OUT_OF_SOURCE_DIR"
16 cd "$OUT_OF_SOURCE_DIR"
17 # Note: Explicitly generate files as these are turned off in releases
18 cmake -D CMAKE_BUILD_TYPE:String=Check -D GEN_FILES=ON "$TF_PSA_CRYPTO_ROOT_DIR"
19 make
20 msg "test: cmake tf-psa-crypto 'out-of-source' build"
21 make test
22 cd "$TF_PSA_CRYPTO_ROOT_DIR"
23 rm -rf "$OUT_OF_SOURCE_DIR"
24}
Ronald Cron020e0262024-10-23 09:37:36 +020025
26component_test_tf_psa_crypto_cmake_as_subdirectory () {
27 msg "build: cmake 'as-subdirectory' build"
28 cd programs/test/cmake_subproject
29 # Note: Explicitly generate files as these are turned off in releases
30 cmake -D GEN_FILES=ON .
31 make
32 ./cmake_subproject
33}