FairMQ/examples/MQ/5-req-rep/testMQEx5.sh.in
2018-05-02 16:12:57 +02:00

27 lines
743 B
Bash
Executable File

#!/bin/bash
ex5config="@CMAKE_BINARY_DIR@/bin/config/ex5-req-rep.json"
# setup a trap to kill everything if the test fails/timeouts
trap 'kill -TERM $CLIENT_PID; kill -TERM $SERVER_PID; wait $CLIENT_PID; wait $SERVER_PID;' TERM
CLIENT="ex5-client"
CLIENT+=" --id client"
CLIENT+=" --control static --log-color false"
CLIENT+=" --max-iterations 1"
CLIENT+=" --mq-config $ex5config"
@CMAKE_BINARY_DIR@/bin/examples/MQ/5-req-rep/$CLIENT &
CLIENT_PID=$!
SERVER="ex5-server"
SERVER+=" --id server"
SERVER+=" --control static --log-color false"
SERVER+=" --max-iterations 1"
SERVER+=" --mq-config $ex5config"
@CMAKE_BINARY_DIR@/bin/examples/MQ/5-req-rep/$SERVER &
SERVER_PID=$!
# wait for everything to finish
wait $CLIENT_PID
wait $SERVER_PID