mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
36 lines
1016 B
Bash
Executable File
36 lines
1016 B
Bash
Executable File
#!/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
|