mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-31 09:32:55 +00:00
all.sh: group psasim helpers
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
9896e08f5e
commit
78c7592755
@ -383,23 +383,6 @@ cleanup()
|
||||
done
|
||||
}
|
||||
|
||||
# This is a helper function to be used in psasim builds. It is meant to clean
|
||||
# up the library's workspace after the server build and before the client
|
||||
# build. Built libraries (mbedcrypto, mbedx509 and mbedtls) are supposed to be
|
||||
# already copied to psasim folder at this point.
|
||||
helper_psasim_cleanup_before_client() {
|
||||
# Clean up library files
|
||||
make -C library clean
|
||||
|
||||
# Restore files that were backup before building library files. This
|
||||
# includes $CONFIG_H and $CRYPTO_CONFIG_H.
|
||||
for x in $files_to_back_up; do
|
||||
if [[ -e "$x$backup_suffix" ]]; then
|
||||
cp -p "$x$backup_suffix" "$x"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Final cleanup when this script exits (except when exiting on a failure
|
||||
# in non-keep-going mode).
|
||||
final_cleanup () {
|
||||
@ -989,6 +972,10 @@ helper_libtestdriver1_make_main() {
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -I../tests/include -I../tests -I../../tests -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_TEST_LIBTESTDRIVER1 $loc_accel_flags" LDFLAGS="-ltestdriver1 $ASAN_CFLAGS" "$@"
|
||||
}
|
||||
|
||||
################################################################
|
||||
#### Helpers for components using psasim
|
||||
################################################################
|
||||
|
||||
# Set some default values $CONFIG_H in order to build server or client sides
|
||||
# in PSASIM. There is only 1 mandatory parameter:
|
||||
# - $1: target which can be "client" or "server"
|
||||
@ -1019,6 +1006,23 @@ helper_psasim_config() {
|
||||
fi
|
||||
}
|
||||
|
||||
# This is a helper function to be used in psasim builds. It is meant to clean
|
||||
# up the library's workspace after the server build and before the client
|
||||
# build. Built libraries (mbedcrypto, mbedx509 and mbedtls) are supposed to be
|
||||
# already copied to psasim folder at this point.
|
||||
helper_psasim_cleanup_before_client() {
|
||||
# Clean up library files
|
||||
make -C library clean
|
||||
|
||||
# Restore files that were backup before building library files. This
|
||||
# includes $CONFIG_H and $CRYPTO_CONFIG_H.
|
||||
for x in $files_to_back_up; do
|
||||
if [[ -e "$x$backup_suffix" ]]; then
|
||||
cp -p "$x$backup_suffix" "$x"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Helper to build the libraries for client/server in PSASIM. If the server is
|
||||
# being built, then it builds also the final executable.
|
||||
# There is only 1 mandatory parameter:
|
||||
|
Loading…
x
Reference in New Issue
Block a user