join-leave-group.sh 637 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
#!/bin/bash -x

if [ -z $srcdir ]; then
    echo srcdir variable not set.
    exit 1
fi
source $srcdir/tests/test-util.sh

TMPOUT=$($MKTEMP -d --tmpdir test-XXXXXX)

11
export SSG_DEBUG_LOGDIR=$TMPOUT
12

13
# launch initial group, storing GID
14
export SSG_GROUP_LAUNCH_DURATION=30
15 16
export SSG_GROUP_LAUNCH_GIDFILE=gid.out
launch_ssg_group_mpi 4 na+sm &
17 18 19 20 21 22
if [ $? -ne 0 ]; then
    wait
    rm -rf $TMPOUT
    exit 1
fi

23
sleep 5
24

25
tests/ssg-join-leave-group -s 25 -l 10 na+sm $SSG_GROUP_LAUNCH_GIDFILE &
26 27 28 29 30 31 32 33 34 35 36 37
if [ $? -ne 0 ]; then
    wait
    rm -rf $TMPOUT
    exit 1
fi

wait
if [ $? -ne 0 ]; then
    rm -rf $TMPOUT
    exit 1
fi

38
rm -rf $TMPOUT
39
exit 0