Commit 106bd3b1 authored by Shane Snyder's avatar Shane Snyder

test utilities for mobject

parent 9d4ed679
#
# General test script utilities
#
if [ -z "$TIMEOUT" ] ; then
echo expected TIMEOUT variable defined to its respective command
exit 1
fi
function run_to()
{
maxtime=${1}s
shift
$TIMEOUT --signal=9 $maxtime "$@"
}
function mobject_test_start_servers()
{
nservers=${1:-4}
startwait=${2:-15}
maxtime=${3:-120}
cfile=${4:-/tmp/mobject-connect-cluster.gid}
run_to $maxtime mpirun -np $nservers src/server/mobject-server-daemon na+sm:// $cfile &
if [ $? -ne 0 ]; then
# TODO: this doesn't actually work; can't check return code of
# something executing in background. We have to rely on the
# return codes of the actual client side tests to tell if
# everything started properly
exit 1
fi
# wait for servers to start
sleep ${startwait}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment