FairMQ/examples/advanced/Region/testMQExRegion.sh.in
2018-05-02 16:12:57 +02:00

36 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
exRegionConfig="@CMAKE_BINARY_DIR@/bin/config/ex-region.json"
msgSize="1000000"
SESSION="$(@CMAKE_BINARY_DIR@/bin/uuidGen -h)"
# setup a trap to kill everything if the test fails/timeouts
trap 'kill -TERM $SAMPLER_PID; kill -TERM $SINK_PID; wait $SAMPLER_PID; wait $SINK_PID; @CMAKE_BINARY_DIR@/bin/shmmonitor --cleanup --session $SESSION' TERM
SAMPLER="ex-region-sampler"
SAMPLER+=" --id sampler1"
SAMPLER+=" --severity debug"
SAMPLER+=" --session $SESSION"
SAMPLER+=" --control static --color false"
SAMPLER+=" --max-iterations 1"
SAMPLER+=" --msg-size $msgSize"
SAMPLER+=" --transport shmem"
SAMPLER+=" --mq-config $exRegionConfig"
@CMAKE_BINARY_DIR@/bin/examples/advanced/Region/$SAMPLER &
SAMPLER_PID=$!
SINK="ex-region-sink"
SINK+=" --id sink1"
SINK+=" --session $SESSION"
SINK+=" --verbosity veryhigh"
SINK+=" --control static --color false"
SINK+=" --max-iterations 1"
SINK+=" --transport shmem"
SINK+=" --mq-config $exRegionConfig"
@CMAKE_BINARY_DIR@/bin/examples/advanced/Region/$SINK &
SINK_PID=$!
# wait for sampler and sink to finish
wait $SAMPLER_PID
wait $SINK_PID