mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-24 22:29:04 +08:00
psasim: add timeout while waiting for psa_server to start
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
c568688456
commit
405d4adff2
@ -8,7 +8,14 @@ set -e
|
||||
# The server creates some local files when it starts up so we can wait for this
|
||||
# event as signal that the server is ready so that we can start client(s).
|
||||
function wait_for_server_startup() {
|
||||
SECONDS=0
|
||||
TIMEOUT=10
|
||||
|
||||
while [ $(find . -name "psa_notify_*" | wc -l) -eq 0 ]; do
|
||||
if [ "$SECONDS" -ge "$TIMEOUT" ]; then
|
||||
echo "Timeout: psa_server not started within $TIMEOUT seconds."
|
||||
return 1
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user