From 8bcad48ca5f46f1e859adeb5ebe77b026c48a771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 23 Oct 2024 10:41:15 +0200 Subject: [PATCH] Add tf-psa-crypto's own all.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With a first component. Signed-off-by: Manuel Pégourié-Gonnard --- tests/scripts/components-build-system.sh | 20 ---------------- tf-psa-crypto/tests/scripts/all.sh | 16 +++++++++++++ .../tests/scripts/components-build-system.sh | 24 +++++++++++++++++++ 3 files changed, 40 insertions(+), 20 deletions(-) create mode 100755 tf-psa-crypto/tests/scripts/all.sh create mode 100644 tf-psa-crypto/tests/scripts/components-build-system.sh diff --git a/tests/scripts/components-build-system.sh b/tests/scripts/components-build-system.sh index a2c32f7e57..2c2d46004e 100644 --- a/tests/scripts/components-build-system.sh +++ b/tests/scripts/components-build-system.sh @@ -85,26 +85,6 @@ component_test_cmake_out_of_source () { rm -rf "$OUT_OF_SOURCE_DIR" } -component_test_cmake_tf_psa_crypto_out_of_source () { - # Remove existing generated files so that we use the ones cmake - # generates - make neat - msg "build: cmake tf-psa-crypto 'out-of-source' build" - MBEDTLS_ROOT_DIR="$PWD" - cd tf-psa-crypto - TF_PSA_CRYPTO_ROOT_DIR="$PWD" - mkdir "$OUT_OF_SOURCE_DIR" - cd "$OUT_OF_SOURCE_DIR" - # Note: Explicitly generate files as these are turned off in releases - cmake -D CMAKE_BUILD_TYPE:String=Check -D GEN_FILES=ON "$TF_PSA_CRYPTO_ROOT_DIR" - make - msg "test: cmake tf-psa-crypto 'out-of-source' build" - make test - cd "$TF_PSA_CRYPTO_ROOT_DIR" - rm -rf "$OUT_OF_SOURCE_DIR" - cd "$MBEDTLS_ROOT_DIR" -} - component_test_cmake_as_subdirectory () { # Remove existing generated files so that we use the ones CMake # generates diff --git a/tf-psa-crypto/tests/scripts/all.sh b/tf-psa-crypto/tests/scripts/all.sh new file mode 100755 index 0000000000..301595830e --- /dev/null +++ b/tf-psa-crypto/tests/scripts/all.sh @@ -0,0 +1,16 @@ +#! /usr/bin/env bash + +# all.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file is executable; it is the entry point for users and the CI. +# See "Files structure" in all-core.sh for other files used. + +# This script must be invoked from the project's root. + +# The path is going to change when this is moved to the framework +source ../tests/scripts/all-core.sh + +main "$@" diff --git a/tf-psa-crypto/tests/scripts/components-build-system.sh b/tf-psa-crypto/tests/scripts/components-build-system.sh new file mode 100644 index 0000000000..957e23a4fc --- /dev/null +++ b/tf-psa-crypto/tests/scripts/components-build-system.sh @@ -0,0 +1,24 @@ +# components-build-system.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file contains test components that are executed by all.sh + +################################################################ +#### Build System Testing +################################################################ + +component_test_cmake_tf_psa_crypto_out_of_source () { + msg "build: cmake tf-psa-crypto 'out-of-source' build" + TF_PSA_CRYPTO_ROOT_DIR="$PWD" + mkdir "$OUT_OF_SOURCE_DIR" + cd "$OUT_OF_SOURCE_DIR" + # Note: Explicitly generate files as these are turned off in releases + cmake -D CMAKE_BUILD_TYPE:String=Check -D GEN_FILES=ON "$TF_PSA_CRYPTO_ROOT_DIR" + make + msg "test: cmake tf-psa-crypto 'out-of-source' build" + make test + cd "$TF_PSA_CRYPTO_ROOT_DIR" + rm -rf "$OUT_OF_SOURCE_DIR" +}