mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
Tests for MQ examples
This commit is contained in:
committed by
Mohammad Al-Turany
parent
984eed1a89
commit
319bdc91a1
35
examples/MQ/4-copypush/testMQEx4.sh.in
Executable file
35
examples/MQ/4-copypush/testMQEx4.sh.in
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
ex4config="@CMAKE_BINARY_DIR@/bin/config/ex4-copypush.json"
|
||||
|
||||
# setup a trap to kill everything if the test fails/timeouts
|
||||
trap 'kill -TERM $SAMPLER_PID; kill -TERM $SINK1_PID; kill -TERM $SINK2_PID; wait $SAMPLER_PID; wait $SINK1_PID; wait $SINK2_PID;' TERM
|
||||
|
||||
SAMPLER="ex4-sampler"
|
||||
SAMPLER+=" --id sampler1"
|
||||
SAMPLER+=" --control static --log-color false"
|
||||
SAMPLER+=" --max-iterations 1"
|
||||
SAMPLER+=" --mq-config $ex4config"
|
||||
@CMAKE_BINARY_DIR@/bin/examples/MQ/4-copypush/$SAMPLER &
|
||||
SAMPLER_PID=$!
|
||||
|
||||
SINK1="ex4-sink"
|
||||
SINK1+=" --id sink1"
|
||||
SINK1+=" --control static --log-color false"
|
||||
SINK1+=" --max-iterations 1"
|
||||
SINK1+=" --mq-config $ex4config"
|
||||
@CMAKE_BINARY_DIR@/bin/examples/MQ/4-copypush/$SINK1 &
|
||||
SINK1_PID=$!
|
||||
|
||||
SINK2="ex4-sink"
|
||||
SINK2+=" --id sink2"
|
||||
SINK2+=" --control static --log-color false"
|
||||
SINK2+=" --max-iterations 1"
|
||||
SINK2+=" --mq-config $ex4config"
|
||||
@CMAKE_BINARY_DIR@/bin/examples/MQ/4-copypush/$SINK2 &
|
||||
SINK2_PID=$!
|
||||
|
||||
# wait for everything to finish
|
||||
wait $SAMPLER_PID
|
||||
wait $SINK1_PID
|
||||
wait $SINK2_PID
|
Reference in New Issue
Block a user