From 6c0c0f20d0398ba812b262ae8d6b71c739ab0dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 16 Oct 2024 10:12:00 +0200 Subject: [PATCH] all.sh: align-dev: tf-psa-crypto stuff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For 3.6 this is useless but should be harmless. Signed-off-by: Manuel Pégourié-Gonnard --- tests/scripts/all.sh | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 220bb0eba8..2d6f0dfdb2 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -141,10 +141,19 @@ pre_check_environment () { pre_initialize_variables () { if in_mbedtls_repo; then CONFIG_H='include/mbedtls/mbedtls_config.h' + if [ -d tf-psa-crypto ]; then + CRYPTO_CONFIG_H='tf-psa-crypto/include/psa/crypto_config.h' + PSA_CORE_PATH='tf-psa-crypto/core' + BUILTIN_SRC_PATH='tf-psa-crypto/drivers/builtin/src' + else + CRYPTO_CONFIG_H='include/psa/crypto_config.h' + fi else CONFIG_H='drivers/builtin/include/mbedtls/mbedtls_config.h' + CRYPTO_CONFIG_H='include/psa/crypto_config.h' + PSA_CORE_PATH='core' + BUILTIN_SRC_PATH='drivers/builtin/src' fi - CRYPTO_CONFIG_H='include/psa/crypto_config.h' CONFIG_TEST_DRIVER_H='tests/include/test/drivers/config_test_driver.h' # Files that are clobbered by some jobs will be backed up. Use a different @@ -338,6 +347,13 @@ cleanup() # Remove Makefiles generated by in-tree CMake builds rm -f 3rdparty/Makefile 3rdparty/*/Makefile pkgconfig/Makefile framework/Makefile rm -f include/Makefile programs/!(fuzz)/Makefile + rm -f tf-psa-crypto/Makefile tf-psa-crypto/include/Makefile + rm -f tf-psa-crypto/core/Makefile tf-psa-crypto/drivers/Makefile + rm -f tf-psa-crypto/tests/Makefile + rm -f tf-psa-crypto/drivers/everest/Makefile + rm -f tf-psa-crypto/drivers/p256-m/Makefile + rm -f tf-psa-crypto/drivers/builtin/Makefile + rm -f tf-psa-crypto/drivers/builtin/src/Makefile # Remove any artifacts from the component_test_cmake_as_subdirectory test. rm -rf programs/test/cmake_subproject/build @@ -430,6 +446,12 @@ armc6_build_test() msg "size: ARM Compiler 6 ($FLAGS)" "$ARMC6_FROMELF" -z library/*.o + if [ -n ${PSA_CORE_PATH} ]; then + "$ARMC6_FROMELF" -z ${PSA_CORE_PATH}/*.o + fi + if [ -n ${BUILTIN_SRC_PATH} ]; then + "$ARMC6_FROMELF" -z ${BUILTIN_SRC_PATH}/*.o + fi } err_msg() @@ -1062,6 +1084,14 @@ run_component () { esac "${dd_cmd[@]}" + if [ -d tf-psa-crypto ]; then + dd_cmd=(dd if=/dev/urandom of=./tf-psa-crypto/tests/seedfile bs=64 count=1) + case $OSTYPE in + linux*|freebsd*|openbsd*) dd_cmd+=(status=none) + esac + "${dd_cmd[@]}" + fi + # Run the component in a subshell, with error trapping and output # redirection set up based on the relevant options. if [ $KEEP_GOING -eq 1 ]; then