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:
35
examples/MQ/multiple-transports/testMTEx.sh.in
Executable file
35
examples/MQ/multiple-transports/testMTEx.sh.in
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
config="@CMAKE_BINARY_DIR@/bin/config/ex-multiple-transports.json"
|
||||
|
||||
trap 'kill -TERM $SAMPLER1_PID; kill -TERM $SAMPLER2_PID; kill -TERM $SINK_PID; wait $SAMPLER1_PID; wait $SAMPLER2_PID; wait $SINK_PID; @CMAKE_BINARY_DIR@/bin/shmmonitor --cleanup;' TERM
|
||||
|
||||
SINK="ex-mt-sink"
|
||||
SINK+=" --id sink1"
|
||||
SINK+=" --max-iterations 1"
|
||||
SINK+=" --control static --log-color false"
|
||||
SINK+=" --transport shmem"
|
||||
SINK+=" --mq-config $config"
|
||||
@CMAKE_BINARY_DIR@/bin/examples/MQ/multiple-transports/$SINK &
|
||||
SINK_PID=$!
|
||||
|
||||
SAMPLER1="ex-mt-sampler1"
|
||||
SAMPLER1+=" --id sampler1"
|
||||
SAMPLER1+=" --max-iterations 1"
|
||||
SAMPLER1+=" --control static --log-color false"
|
||||
SAMPLER1+=" --transport shmem"
|
||||
SAMPLER1+=" --mq-config $config"
|
||||
@CMAKE_BINARY_DIR@/bin/examples/MQ/multiple-transports/$SAMPLER1 &
|
||||
SAMPLER1_PID=$!
|
||||
|
||||
SAMPLER2="ex-mt-sampler2"
|
||||
SAMPLER2+=" --id sampler2"
|
||||
SAMPLER2+=" --max-iterations 1"
|
||||
SAMPLER2+=" --control static --log-color false"
|
||||
SAMPLER2+=" --transport nanomsg"
|
||||
SAMPLER2+=" --mq-config $config"
|
||||
@CMAKE_BINARY_DIR@/bin/examples/MQ/multiple-transports/$SAMPLER2 &
|
||||
SAMPLER2_PID=$!
|
||||
|
||||
wait $SAMPLER1_PID
|
||||
wait $SAMPLER2_PID
|
||||
wait $SINK_PID
|
Reference in New Issue
Block a user