mobject-connect-test.sh 759 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/bash -x

if [ -z $srcdir ]; then
    echo srcdir variable not set.
    exit 1
fi
if [ -z "$MKTEMP" ] ; then
    echo expected MKTEMP variable defined to its respective command
    exit 1
fi
source $srcdir/tests/mobject-test-util.sh

TEST_DIR=`$MKTEMP -d /tmp/mobject-connect-test-XXXXXX`
14 15 16
MOBJECT_CLUSTER_FILE=$TEST_DIR/cluster.gid

##############
17 18

# start 1 server with 2 second wait, 20s timeout
19 20 21 22
mobject_test_start_servers 1 2 20 $MOBJECT_CLUSTER_FILE

##############

23
# export some mobject client env variables
24
export MOBJECT_CLUSTER_FILE
25 26 27
export MOBJECT_SHUTDOWN_KILL_SERVERS=true

# run a connect test client
28 29 30 31 32 33 34
run_to 10 tests/mobject-connect-test
if [ $? -ne 0 ]; then
    wait
    exit 1
fi

##############
35 36 37 38 39

wait

# cleanup
rm -rf $TEST_DIR
40

41
exit 0