#!/bin/sh
#
# looptest
#
# 08/21/98 katayama@rd.nacsis.ac.jp
#

buildSRTree=../c-samples/buildSRTree
checkSRTree=../c-samples/checkSRTree

i=0
while [ $i -le 1000 ]; do
  echo $i

  $buildSRTree -d -c $i -b 4096 16 sample.db loop.dat > loop.log 2>&1
  code=$?
  if [ $code != 0 ]; then
     echo "buildSRTree exited with the code $code"
     exit 1
  fi

  $checkSRTree loop.dat >> loop.log 2>&1
  code=$?
  if [ $code != 0 ]; then
     echo "Command exited with the code $code"
     exit 1
  fi

  i=`expr $i + 1`
done
