blob: 58ab8506bf3f866d3c7948831f6f0d74c0e045eb [file] [log] [blame]
Valerio Settif67ded32024-06-27 08:03:32 +02001#!/bin/bash
2
3# Copyright The Mbed TLS Contributors
4# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
5
6set -e
7
8# The server creates some local files when it starts up so we can wait for this
9# event as signal that the server is ready so that we can start client(s).
10function wait_for_server_startup() {
Ronald Cronb6f6cc82024-07-18 15:21:20 +020011 while [ -z $(find /tmp -maxdepth 1 -name "psa_notify_*" -printf 1 -quit) ]; do
Valerio Settif67ded32024-06-27 08:03:32 +020012 sleep 0.1
13 done
14}
15
16$(dirname "$0")/kill_server.sh
17
18$(dirname "$0")/psa_server &
19wait_for_server_startup