Commit dec7b672 authored by Shane Snyder's avatar Shane Snyder

get make check scripts working again

parent 8c2225b1
...@@ -9,15 +9,6 @@ source $srcdir/tests/test-util.sh ...@@ -9,15 +9,6 @@ source $srcdir/tests/test-util.sh
# start 1 server with 2 second wait, 20s timeout # start 1 server with 2 second wait, 20s timeout
test_start_servers 1 2 20 test_start_servers 1 2 20
# actual test case
#####################
# run_to 10 src/SOME_EXAMPLE_PROGRAM $svr1
# if [ $? -ne 0 ]; then
# run_to 10 src/bb-shutdown $svr1 &> /dev/null
# wait
# exit 1
# fi
sleep 1 sleep 1
##################### #####################
......
...@@ -26,25 +26,17 @@ function test_start_servers () ...@@ -26,25 +26,17 @@ function test_start_servers ()
{ {
nservers=${1:-4} nservers=${1:-4}
startwait=${2:-15} startwait=${2:-15}
maxtime=${3:-120}s maxtime=${3:-120}
repfactor=${4:-0}
pid=$$
startport=3344
endport=`expr 3344 + $nservers - 1`
# start daemons # start daemons
for i in `seq $startport $endport` for i in `seq $nservers`
do do
truncate -s 100M $TMPBASE/foo-$i.dat src/bake-bulk-mkpool -s 100M $TMPBASE/svr-$i.dat
if [ $? -ne 0 ]; then
exit 1
fi
pmempool create obj $TMPBASE/foo-$i.dat
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
timeout --signal=9 ${maxtime} src/bake-bulk-server-daemon tcp://localhost:$i $TMPBASE/foo-$i.dat & run_to ${maxtime} src/bake-bulk-server-daemon -f $TMPBASE/svr-$i.addr na+sm $TMPBASE/svr-$i.dat &
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
# TODO: this doesn't actually work; can't check return code of # TODO: this doesn't actually work; can't check return code of
# something executing in background. We have to rely on the # something executing in background. We have to rely on the
...@@ -57,5 +49,5 @@ function test_start_servers () ...@@ -57,5 +49,5 @@ function test_start_servers ()
# wait for servers to start # wait for servers to start
sleep ${startwait} sleep ${startwait}
svr1="tcp://localhost:$startport" svr1=`cat $TMPBASE/svr-1.addr`
} }
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