# Copyright 2006-2008 The FLWOR Foundation.                                                             
#  
# Licensed under the Apache License, Version 2.0 (the "License");                                       
# you may not use this file except in compliance with the License.                                      
# You may obtain a copy of the License at
#  
# http://www.apache.org/licenses/LICENSE-2.0                                                            
#  
# Unless required by applicable law or agreed to in writing, software                                   
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.                              
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/bash

#
# Note: the standard output of this script goes to a temp file, which is then
# appended to the file:
#
# /zorbatest/snapshots/latest/test_results/acceptance/rbkt/result.txt
#

if [ ! ${zorbaRepos} ]; then

  if [ ! ${SRC} ]; then
    echo "ERROR: SRC variable is not set"
    exit 1
  fi

  export zorbaRepos=$SRC
fi


if [ ! ${zorbaExecDir} ]; then

  if [ ! ${ZORBA_EXEC_DIR} ]; then
    echo "ERROR: ZORBA_EXEC_DIR variable is not set"
    exit 1
  fi

  export zorbaExecDir=$ZORBA_EXEC_DIR
fi

# pwd = /zorbatest/snapshots/latest/tests/acceptance/rbkt/

$zorbaExecDir/rbkt/Scripts/rbkt.sh -b paths > /dev/null


# pwd = /zorbatest/snapshots/latest/tests/acceptance/rbkt/


echo
cat rbkt_summary.txt
echo

rm -f rbkt_summary.txt
rm -f query.xml query.dot
