mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-16 01:51:45 +00:00
Tests for MQ examples
This commit is contained in:
26
examples/MQ/5-req-rep/testMQEx5.sh.in
Executable file
26
examples/MQ/5-req-rep/testMQEx5.sh.in
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/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
|
Reference in New Issue
Block a user