Adapt all.sh
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index b2f6bf2..7590a03 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -343,6 +343,7 @@
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
@@ -1206,7 +1207,8 @@
# Find legacy dependencies in PSA tests
grep 'depends_on' \
- tests/suites/test_suite_psa*.data tests/suites/test_suite_psa*.function |
+ tf-psa-crypto/tests/suites/test_suite_psa*.data \
+ tf-psa-crypto/tests/suites/test_suite_psa*.function |
grep -Eo '!?MBEDTLS_[^: ]*' |
grep -v -e MBEDTLS_PSA_ -e MBEDTLS_TEST_ |
sort -u > $found
@@ -1446,7 +1448,7 @@
# dependency resolution for generated files and just rely on them being
# present (thanks to pre_generate_files) by turning GEN_FILES off.
CC=$ASAN_CC cmake -D GEN_FILES=Off -D CMAKE_BUILD_TYPE:String=Asan .
- tests/scripts/test-ref-configs.pl
+ tests/scripts/test-ref-configs.pl config-tfm.h
}
component_test_no_renegotiation () {
@@ -2082,6 +2084,9 @@
SKIP_TEST_SUITES=$(
git -C tests/suites grep -L TEST_CF_ 'test_suite_*.function' |
sed 's/test_suite_//; s/\.function$//' |
+ tr '\n' ,),$(
+ git -C tf-psa-crypto/tests/suites grep -L TEST_CF_ 'test_suite_*.function' |
+ sed 's/test_suite_//; s/\.function$//' |
tr '\n' ,)
export SKIP_TEST_SUITES
}
@@ -2092,6 +2097,10 @@
ls -1 tests/suites/test_suite_*.function |
grep -v $1.function |
sed 's/tests.suites.test_suite_//; s/\.function$//' |
+ tr '\n' ,),$(
+ ls -1 tf-psa-crypto/tests/suites/test_suite_*.function |
+ grep -v $1.function |
+ sed 's/tf-psa-crypto.tests.suites.test_suite_//; s/\.function$//' |
tr '\n' ,)
export SKIP_TEST_SUITES
}
@@ -4511,13 +4520,13 @@
msg "all loops unrolled"
make clean
- make -C tests test_suite_shax CFLAGS="-DMBEDTLS_SHA3_THETA_UNROLL=1 -DMBEDTLS_SHA3_PI_UNROLL=1 -DMBEDTLS_SHA3_CHI_UNROLL=1 -DMBEDTLS_SHA3_RHO_UNROLL=1"
- ./tests/test_suite_shax
+ make -C tests ../tf-psa-crypto/tests/test_suite_shax CFLAGS="-DMBEDTLS_SHA3_THETA_UNROLL=1 -DMBEDTLS_SHA3_PI_UNROLL=1 -DMBEDTLS_SHA3_CHI_UNROLL=1 -DMBEDTLS_SHA3_RHO_UNROLL=1"
+ ./tf-psa-crypto/tests/test_suite_shax
msg "all loops rolled up"
make clean
- make -C tests test_suite_shax CFLAGS="-DMBEDTLS_SHA3_THETA_UNROLL=0 -DMBEDTLS_SHA3_PI_UNROLL=0 -DMBEDTLS_SHA3_CHI_UNROLL=0 -DMBEDTLS_SHA3_RHO_UNROLL=0"
- ./tests/test_suite_shax
+ make -C tests ../tf-psa-crypto/tests/test_suite_shax CFLAGS="-DMBEDTLS_SHA3_THETA_UNROLL=0 -DMBEDTLS_SHA3_PI_UNROLL=0 -DMBEDTLS_SHA3_CHI_UNROLL=0 -DMBEDTLS_SHA3_RHO_UNROLL=0"
+ ./tf-psa-crypto/tests/test_suite_shax
}
support_test_aesni_m32() {
@@ -6148,6 +6157,14 @@
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