Tests for MQ examples

This commit is contained in:
Alexey Rybalchenko
2017-08-23 11:12:29 +02:00
committed by Mohammad Al-Turany
parent 984eed1a89
commit 319bdc91a1
57 changed files with 658 additions and 118 deletions

View 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