copy-to.sh 616 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/bash -x

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

# start 1 server with 2 second wait, 20s timeout
test_start_servers 1 2 20

# actual test case
#####################

Philip Carns's avatar
Philip Carns committed
15 16
echo "Hello world." > $TMPBASE/foo.dat
run_to 10 src/bb-copy-to $TMPBASE/foo.dat $svr1
17 18 19 20 21
if [ $? -ne 0 ]; then
    run_to 10 src/bb-shutdown $svr1 &> /dev/null 
    wait
    exit 1
fi
Philip Carns's avatar
Philip Carns committed
22

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
sleep 1

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

# tear down
run_to 10 src/bb-shutdown $svr1 &> /dev/null 
if [ $? -ne 0 ]; then
    wait
    exit 1
fi

wait

echo cleaning up $TMPBASE
rm -rf $TMPBASE

exit 0