mobject-client-test.sh 758 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
#!/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`
MOBJECT_CLUSTER_FILE=$TEST_DIR/cluster.gid

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

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

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

# export some mobject client env variables
export MOBJECT_CLUSTER_FILE
export MOBJECT_SHUTDOWN_KILL_SERVERS=true

# run a mobject test client
run_to 10 tests/mobject-client-test
if [ $? -ne 0 ]; then
    wait
    exit 1
fi

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

wait

# cleanup
rm -rf $TEST_DIR

exit 0