From d10f42f5e6409f989009b64ee22488e35175d16b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 30 Oct 2024 09:52:36 +0100 Subject: [PATCH] Fix making the path of the outcomes file absolute. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- tests/scripts/all.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index d09e2908e9..20ca89951d 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -93,8 +93,18 @@ if [ "$is_crypto" -eq 0 -a "$is_mbedtls" -eq 0 ]; then exit 1 fi + # Invoke the real thing if [ "$is_crypto" -eq 1 ]; then + # Make sure the path to the outcomes file is absolute. This is done by + # pre_prepare_outcome_file() however by the time it runs we've already + # changed the working directory, so do it now. + if [ -n "${MBEDTLS_TEST_OUTCOME_FILE+set}" ]; then + case "$MBEDTLS_TEST_OUTCOME_FILE" in + [!/]*) MBEDTLS_TEST_OUTCOME_FILE="$PWD/$MBEDTLS_TEST_OUTCOME_FILE";; + esac + export MBEDTLS_TEST_OUTCOME_FILE + fi cd tf-psa-crypto exec tests/scripts/all.sh "$@" else