← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/prune-rbkt into lp:zorba

 

Chris Hillery has proposed merging lp:~zorba-coders/zorba/prune-rbkt into lp:zorba.

Requested reviews:
  Zorba Coders (zorba-coders)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/prune-rbkt/+merge/164088
-- 
https://code.launchpad.net/~zorba-coders/zorba/prune-rbkt/+merge/164088
Your team Zorba Coders is requested to review the proposed merge of lp:~zorba-coders/zorba/prune-rbkt into lp:zorba.
=== modified file 'test/CMakeLists.txt'
--- test/CMakeLists.txt	2013-05-14 10:07:03 +0000
+++ test/CMakeLists.txt	2013-05-16 08:27:29 +0000
@@ -23,11 +23,12 @@
 
 INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/src)
 INCLUDE_DIRECTORIES(BEFORE ${CMAKE_BINARY_DIR}/src)
-INCLUDE_DIRECTORIES(BEFORE ${CMAKE_BINARY_DIR}/test)
 INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
 
 INCLUDE(${CMAKE_SOURCE_DIR}/cmake_modules/ZorbaGenerateExe.cmake)
 
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/driver)
+ADD_SUBDIRECTORY(driver)
 ADD_SUBDIRECTORY(api)
 ADD_SUBDIRECTORY(rbkt)
 ADD_SUBDIRECTORY(extern)

=== removed directory 'test/commons'
=== added directory 'test/driver'
=== added file 'test/driver/CMakeLists.txt'
--- test/driver/CMakeLists.txt	1970-01-01 00:00:00 +0000
+++ test/driver/CMakeLists.txt	2013-05-16 08:27:29 +0000
@@ -0,0 +1,97 @@
+# Copyright 2006-2013 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.
+
+# configure the testdrivers
+CONFIGURE_FILE(testdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/testdriverconfig.h)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+
+
+#
+# Compile and build the testdriver executable
+#
+SET (TESTDRIVER_SRCS
+  testdriver.cpp
+  testdriver_common.cpp
+  testdriver_comparator.cpp
+  testuriresolver.cpp
+  )
+
+ZORBA_GENERATE_EXE("testdriver" "${TESTDRIVER_SRCS}" "" "" "bin")
+
+#
+# Compile and build the multi-threaded testdriver executable, if boost
+# available
+#
+
+FIND_PACKAGE(Boost COMPONENTS filesystem)
+IF (NOT Boost_FILESYSTEM_FOUND)
+  MESSAGE(STATUS "Boost filesystem or system component not found - not building multithreaded test driver")
+ELSE (NOT Boost_FILESYSTEM_FOUND)
+  MESSAGE(STATUS "Found Boost v${Boost_LIB_VERSION}: ${Boost_INCLUDE_DIRS}")
+  MESSAGE(STATUS "      Boost lib path: ${Boost_LIBRARY_DIRS}")
+
+  # Assume this is OK for the moment...
+  SET (ZORBATEST_TESTDRIVER_MT_AVAILABLE TRUE)
+
+  IF (Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION GREATER 34)
+    # Boost 1.35 and above included a separate "system" component. In
+    # at least some versions, filesystem depends on system - and the
+    # Mac linker apparently does not figure this out. Therefore we
+    # need to link it explicitly, which means we need to find it
+    # first.
+    FIND_PACKAGE(Boost COMPONENTS system)
+    IF (NOT Boost_SYSTEM_FOUND)
+      MESSAGE(STATUS "Did NOT find Boost SYSTEM component - not building multithreaded test driver")
+      SET (ZORBATEST_TESTDRIVER_MT_AVAILABLE FALSE)
+    ELSE (NOT Boost_SYSTEM_FOUND)
+      SET (Boost_system_lib "boost_system-mt")
+    ENDIF (NOT Boost_SYSTEM_FOUND)
+    
+  ENDIF (Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION GREATER 34)
+
+ENDIF (NOT Boost_FILESYSTEM_FOUND)
+
+IF (ZORBATEST_TESTDRIVER_MT_AVAILABLE)
+  INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+
+  SET (TESTDRIVER_MT_SRCS
+    testdriver_mt.cpp
+    testdriver_common.cpp
+    testdriver_comparator.cpp
+    testuriresolver.cpp
+    )
+
+  ZORBA_GENERATE_EXE(
+    "testdriver_mt" "${TESTDRIVER_MT_SRCS}" "${Boost_LIBRARIES}" "" "")
+
+  SET (ZORBATEST_USE_MT_XQTS NO CACHE BOOLEAN
+    "If true, use testdriver_mt (when available) for running XQTS")
+  MARK_AS_ADVANCED (ZORBATEST_USE_MT_XQTS)
+
+ENDIF (ZORBATEST_TESTDRIVER_MT_AVAILABLE)
+
+# Compile and build the update testdriver executable
+SET(UPDTESTDRIVER_SRCS
+    updtestdriver.cpp
+    testdriver_comparator.cpp
+    testuriresolver.cpp)
+ZORBA_GENERATE_EXE("updtestdriver" "${UPDTESTDRIVER_SRCS}" "" "" "")
+
+# Compile and build the SAX2 test driver executable
+SET (SAX2_TESTDRIVER_SRCS
+  sax2testdriver.cpp
+  ${CMAKE_SOURCE_DIR}/test/driver/testdriver_comparator.cpp
+  )
+
+ZORBA_GENERATE_EXE(sax2testdriver "${SAX2_TESTDRIVER_SRCS}" "" "" "")

=== renamed file 'test/sax2/sax2testdriver.cpp' => 'test/driver/sax2testdriver.cpp'
--- test/sax2/sax2testdriver.cpp	2013-02-26 04:12:43 +0000
+++ test/driver/sax2testdriver.cpp	2013-05-16 08:27:29 +0000
@@ -26,7 +26,7 @@
 
 #include <zorba/util/file.h>
 
-#include "sax2testdriverconfig.h" // SRC and BIN dir definitions
+#include "testdriverconfig.h" // SRC and BIN dir definitions
 
 #include <zorba/zorba.h>
 #include <zorba/default_content_handler.h>

=== renamed file 'test/rbkt/specification.h' => 'test/driver/specification.h'
--- test/rbkt/specification.h	2013-02-07 17:24:36 +0000
+++ test/driver/specification.h	2013-05-16 08:27:29 +0000
@@ -22,7 +22,7 @@
 #include <sstream>
 #include <util/ascii_util.h>
 #include <zorba/util/uri.h>
-#include <testuriresolver.h>
+#include "testuriresolver.h"
 #include <zorba/uri_resolvers.h>
 
 #undef WIN32_LEAN_AND_MEAN

=== renamed file 'test/rbkt/testdriver.cpp' => 'test/driver/testdriver.cpp'
=== renamed file 'test/rbkt/testdriver_common.cpp' => 'test/driver/testdriver_common.cpp'
=== renamed file 'test/rbkt/testdriver_common.h' => 'test/driver/testdriver_common.h'
=== renamed file 'test/commons/testdriver_comparator.cpp' => 'test/driver/testdriver_comparator.cpp'
=== renamed file 'test/commons/testdriver_comparator.h' => 'test/driver/testdriver_comparator.h'
=== renamed file 'test/rbkt/testdriver_mt.cpp' => 'test/driver/testdriver_mt.cpp'
=== renamed file 'test/rbkt/testdriverconfig.h.in' => 'test/driver/testdriverconfig.h.in'
--- test/rbkt/testdriverconfig.h.in	2013-02-07 17:24:36 +0000
+++ test/driver/testdriverconfig.h.in	2013-05-16 08:27:29 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006-2008 The FLWOR Foundation.
+ * Copyright 2006-2013 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.
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef XQP_RBKT_TESTDRIVER_CONFIG_H
-#define XQP_RBKT_TESTDRIVER_CONFIG_H
+#ifndef ZORBA_TESTDRIVER_CONFIG_H
+#define ZORBA_TESTDRIVER_CONFIG_H
 
 #cmakedefine ZORBA_TEST_XQUERYX
 
@@ -25,8 +25,13 @@
 
 namespace zorba {
 
-static std::string RBKT_SRC_DIR = "@CMAKE_CURRENT_SOURCE_DIR@";
-static std::string RBKT_BINARY_DIR = "@CMAKE_CURRENT_BINARY_DIR@";
+static std::string RBKT_SRC_DIR = "@CMAKE_SOURCE_DIR@/test/rbkt";
+static std::string RBKT_BINARY_DIR = "@CMAKE_BINARY_DIR@/test/rbkt";
 static std::string CMAKE_BINARY_DIR = "@CMAKE_BINARY_DIR@";
+static std::string UPDATE_SRC_DIR = "@CMAKE_SOURCE_DIR@/test/update";
+static std::string UPDATE_BINARY_DIR = "@CMAKE_BINARY_DIR@/test/update";
+static std::string SAX2_SRC_DIR = "@CMAKE_SOURCE_DIR@/test/sax2";
+static std::string SAX2_BINARY_DIR = "@CMAKE_BINARY_DIR@/test/sax2";
+
 }
-#endif
+#endif /* ZORBA_TESTDRIVER_CONFIG_H */

=== renamed file 'test/commons/testuriresolver.cpp' => 'test/driver/testuriresolver.cpp'
=== renamed file 'test/commons/testuriresolver.h' => 'test/driver/testuriresolver.h'
=== renamed file 'test/update/specification.h' => 'test/driver/updspecification.h'
=== renamed file 'test/update/updtestdriver.cpp' => 'test/driver/updtestdriver.cpp'
--- test/update/updtestdriver.cpp	2013-04-17 16:18:23 +0000
+++ test/driver/updtestdriver.cpp	2013-05-16 08:27:29 +0000
@@ -26,7 +26,7 @@
 
 #include "testdriverconfig.h" // SRC and BIN dir definitions
 #include "testuriresolver.h"
-#include "specification.h" // parsing spec files
+#include "updspecification.h" // parsing spec files
 #include "common/common.h"
 
 #include <zorba/zorba.h>

=== modified file 'test/rbkt/CMakeLists.txt'
--- test/rbkt/CMakeLists.txt	2013-02-26 04:12:43 +0000
+++ test/rbkt/CMakeLists.txt	2013-05-16 08:27:29 +0000
@@ -1,4 +1,4 @@
-# Copyright 2006-2008 The FLWOR Foundation.
+# Copyright 2006-2013 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.
@@ -12,86 +12,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ADD_SUBDIRECTORY(Scripts)
 ADD_SUBDIRECTORY(ExpCompilerResults)
 
-# configure the testdriver
-CONFIGURE_FILE(testdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/testdriverconfig.h)
-
 # configure itertest
 CONFIGURE_FILE(itertest.xq.in ${CMAKE_CURRENT_BINARY_DIR}/itertest.xq)
 
-#
-# Compile and build the testdriver executable
-#
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/test/commons)
-
-SET (TESTDRIVER_SRCS
-  testdriver.cpp
-  testdriver_common.cpp
-  ${CMAKE_SOURCE_DIR}/test/commons/testdriver_comparator.cpp
-  ${CMAKE_SOURCE_DIR}/test/commons/testuriresolver.cpp
-  )
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE(ZorbaGenerateExe)
-ZORBA_GENERATE_EXE("testdriver" "${TESTDRIVER_SRCS}" "" "" "bin")
-#SET_TARGET_PROPERTIES(testdriver PROPERTIES OUTPUT_NAME zorba-testdriver)
-
-
-#
-# Compile and build the multi-threaded testdriver executable, if boost
-# available
-#
-
-FIND_PACKAGE(Boost COMPONENTS filesystem)
-IF (NOT Boost_FILESYSTEM_FOUND)
-  MESSAGE(STATUS "Boost filesystem or system component not found - not building multithreaded test driver")
-ELSE (NOT Boost_FILESYSTEM_FOUND)
-  MESSAGE(STATUS "Found Boost v${Boost_LIB_VERSION}: ${Boost_INCLUDE_DIRS}")
-  MESSAGE(STATUS "      Boost lib path: ${Boost_LIBRARY_DIRS}")
-
-  # Assume this is OK for the moment...
-  SET (ZORBATEST_TESTDRIVER_MT_AVAILABLE TRUE)
-
-  IF (Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION GREATER 34)
-    # Boost 1.35 and above included a separate "system" component. In
-    # at least some versions, filesystem depends on system - and the
-    # Mac linker apparently does not figure this out. Therefore we
-    # need to link it explicitly, which means we need to find it
-    # first.
-    FIND_PACKAGE(Boost COMPONENTS system)
-    IF (NOT Boost_SYSTEM_FOUND)
-      MESSAGE(STATUS "Did NOT find Boost SYSTEM component - not building multithreaded test driver")
-      SET (ZORBATEST_TESTDRIVER_MT_AVAILABLE FALSE)
-    ELSE (NOT Boost_SYSTEM_FOUND)
-      SET (Boost_system_lib "boost_system-mt")
-    ENDIF (NOT Boost_SYSTEM_FOUND)
-    
-  ENDIF (Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION GREATER 34)
-
-ENDIF (NOT Boost_FILESYSTEM_FOUND)
-
-IF (ZORBATEST_TESTDRIVER_MT_AVAILABLE)
-  INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
-
-  SET (TESTDRIVER_MT_SRCS
-    testdriver_mt.cpp
-    testdriver_common.cpp
-    ${CMAKE_SOURCE_DIR}/test/commons/testdriver_comparator.cpp
-    ${CMAKE_SOURCE_DIR}/test/commons/testuriresolver.cpp
-    )
-
-  ZORBA_GENERATE_EXE(
-    "testdriver_mt" "${TESTDRIVER_MT_SRCS}" "${Boost_LIBRARIES}" "" "")
-
-  SET (ZORBATEST_USE_MT_XQTS NO CACHE BOOLEAN
-    "If true, use testdriver_mt (when available) for running XQTS")
-  MARK_AS_ADVANCED (ZORBATEST_USE_MT_XQTS)
-
-ENDIF (ZORBATEST_TESTDRIVER_MT_AVAILABLE)
-
 # The NO_CTEST variable can be set to 1 so that CMake does not search
 # for and add most of the Zorba tests, to speed up building and
 # compiling the project.

=== removed directory 'test/rbkt/Documents'
=== removed directory 'test/rbkt/Documents/test'
=== removed file 'test/rbkt/Documents/test/bad1.xml'
=== removed file 'test/rbkt/Documents/test/bad2.xml'
--- test/rbkt/Documents/test/bad2.xml	2013-02-07 17:24:36 +0000
+++ test/rbkt/Documents/test/bad2.xml	1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
-<test:Plan xmlns:test='http://test.org/schema'
-  <test:Case name='test1' emptyAttribute='' test:ns_id='auio'>
-  </test:Case>

=== removed file 'test/rbkt/Documents/test/test1.xml'
--- test/rbkt/Documents/test/test1.xml	2013-02-07 17:24:36 +0000
+++ test/rbkt/Documents/test/test1.xml	1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<test:Plan xmlns:test='http://test.org/schema'>
-  <test:Case name='test1' emptyAttribute='' test:ns_id='auio'>
-  </test:Case>
-  <test:text>my name <b>is</b> foo</test:text>
-</test:Plan>

=== removed file 'test/rbkt/Documents/test/test2.xml'
--- test/rbkt/Documents/test/test2.xml	2013-02-07 17:24:36 +0000
+++ test/rbkt/Documents/test/test2.xml	1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
-<test:Plan xmlns:test='http://test.org/schema'>
-  <test:Case name='test1' emptyAttribute='' test:ns_id='auio'>
-  </test:Case>
-  <test:text>my name <b>is</b> foo</test:text>
-</test:Plan>

=== removed file 'test/rbkt/Documents/test/test3.xml'
--- test/rbkt/Documents/test/test3.xml	2013-02-07 17:24:36 +0000
+++ test/rbkt/Documents/test/test3.xml	1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<test:Plan xmlns:test='http://test.org/schema'>
-  <test:Case name='test1' emptyAttribute='' test:ns_id='auio'>
-  </test:Case><!-- this is a comment -->
-  <test:text>my name <b>is</b> &lt;foo&gt; and <![CDATA[this is some < &amp; cdata>]]> </test:text>
-</test:Plan>

=== removed file 'test/rbkt/Documents/test/test4.xml'
--- test/rbkt/Documents/test/test4.xml	2013-02-07 17:24:36 +0000
+++ test/rbkt/Documents/test/test4.xml	1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plan>
-  <test:Case xmlns:test='http://test.org/schema' name='test1' emptyAttribute='' test:ns_id='auio'>
-  </test:Case><!-- this is a comment -->
-  <test:text xmlns:test='http://test.org/schema2'>my name <b>is</b> foo></test:text>
-  <text>this is some more text</text>
-  <pre:foo xmlns:pre='http://test.org/pre1'>
-     <pre:boo1/>
-     <pre:boo2/>
-     <pre:boo3> <goo1/> <goo2 xmlns:gg='http://test.org/schema3'/> </pre:boo3>
-     <pre:boo4>
-       <pre:goo3 xmlns:pre='http://test.org/pre2'/>
-     </pre:boo4>
-  </pre:foo>
-</plan>

=== removed file 'test/rbkt/Scripts/CMakeLists.txt'
--- test/rbkt/Scripts/CMakeLists.txt	2013-02-07 17:24:36 +0000
+++ test/rbkt/Scripts/CMakeLists.txt	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-# 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.
-SET(zorbaRepos ${CMAKE_SOURCE_DIR})
-SET(zorbaExecDir ${CMAKE_BINARY_DIR}/test)
-SET(zorbaBuildDir ${CMAKE_BINARY_DIR} )
-SET( zorbaVersion "${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}" )
-
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/rbkt.sh.in ${CMAKE_CURRENT_BINARY_DIR}/rbkt.sh @ONLY)
-
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/lbkt.sh.in ${CMAKE_CURRENT_BINARY_DIR}/lbkt.sh @ONLY)
-
-CONFIGURE_FILE ( ${CMAKE_CURRENT_SOURCE_DIR}/resultToXml.py.in ${CMAKE_CURRENT_BINARY_DIR}/resultToXml.py @ONLY )

=== removed file 'test/rbkt/Scripts/cmp_ctest_logs'
--- test/rbkt/Scripts/cmp_ctest_logs	2013-02-07 17:24:36 +0000
+++ test/rbkt/Scripts/cmp_ctest_logs	1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
-#!/bin/sh
-# 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.
-
-if test "$#" != "2"; then
-    echo Args: dir1/LastTestsFailed.log[.gz] dir2/LastTestsFailed.log[.gz]
-    exit 1
-fi
-
-TMP1=`mktemp /tmp/XXXXXX`
-
-mycat()
-{
-  if test "`basename $1 .gz`" != "`basename $1`"; then zcat $1; else cat $1; fi
-}
-
-mycat $2 | cut -f2 -d: | sort >$TMP1
-
-mycat $1 | cut -f2 -d: | sort | diff -U0 $TMP1 - | tail -n +3 | egrep -v '^@'
-
-rm -f $TMP1

=== removed file 'test/rbkt/Scripts/functions.sh'
--- test/rbkt/Scripts/functions.sh	2013-02-07 17:24:36 +0000
+++ test/rbkt/Scripts/functions.sh	1970-01-01 00:00:00 +0000
@@ -1,489 +0,0 @@
-# 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
-
-
-################################################################################
-#                                                                              #
-#                                   rbkt usage                                 #
-#                                                                              #
-################################################################################
-
-
-function usage ()
-{
-  echo "rbkt.sh [-b bucketName [-q queryName]] [-d displayFormat] [-h]"
-  echo "or"
-  echo "rbkt.sh [-b bucketName1 ... bucketNameN] [-d displayFormat] [-h]"
-  echo
-  echo "Run a single query, or all the queries inside a directory (bucket), or all"
-  echo "the queries in a list of buckets, or all the queries that can be found"
-  echo "anywhere inside the Queries dir."
-  echo 
-  echo "Options : "
-  echo
-  echo "-b: Specifies the query bucket to run. <bucketName> is used to construct"
-  echo "    the full pathnames for the directories that contain a group of queries,"
-  echo "    their expected results, and their actual results. For example, if"
-  echo "    bucketName is foo, rbkt will run queries in .../test/rbkt/Queries/foo"
-  echo
-  echo "-q: The query to run. The query string is in file <queryName>.xq inside"
-  echo "    the .../test/rbkt/Queries/<bucketName> directory."
-  echo
-  echo "-d: Specifies the display format for the query results. Currently, this"
-  echo "    may be one of xml or show. The default is xml"
-  echo
-  echo "-h : help"
-}
-
-
-################################################################################
-#                                                                              #
-#                                 Test Directories                             #
-#                                                                              #
-################################################################################
-
-#
-# Function to check the existence of the required test dirs and to create
-# the results dir.
-#
-function buildDirEnv
-{
-  #echo; echo "buildDirEnv: Checking/Building Environment Directories"
-
-  if [ ! -d ${zorbaRepos} ]; then
-     echo "ERROR 5 buildDirEnv: zorba root directory ${sorbaRepos} does not exist"
-     return 5
-  fi
-
-  if [ ! -d ${testRootDir} ]; then
-     echo "ERROR 10 buildDirEnv: test root directory ${testRootDir} does not exist"
-     return 10
-  fi
-
-  if [ ! -d $scriptsDir ]; then
-     echo "ERROR 14 buildDirEnv: test scripts directory $scriptsDir does not exist"
-     return 14
-  fi
-
-  if [ ! -d ${queriesDir} ]; then
-     echo "ERROR 12 buildDirEnv: queries directory ${queriesDir} does not exist"
-     return 12
-  fi
-  if [ ! -d ${expQueryResultsDir} ]; then
-     echo "ERROR 13 buildDirEnv: expected results directory ${expQueryResultsDir} does not exist"
-     return 13
-  fi
-
-  mkdir -p ${queryResultsDir}
-
-  if [ ! -d ${docsDir} ]; then
-     echo "ERROR 12 buildDirEnv: source docs directory ${docsDir} does not exist"
-     return 12
-  fi
-  if [ ! -d ${expLoaderResultsDir} ]; then
-     echo "ERROR 13 buildDirEnv: expected docs directory ${expLoaderResultsDir} does not exist"
-     return 13
-  fi
-
-  mkdir -p ${loaderResultsDir}
-
-  return 0
-}
-
-
-################################################################################
-#                                                                              #
-#                                 Running Queries                              #
-#                                                                              #
-################################################################################
-
-
-#
-# params: 
-#
-# $1 queryFile
-# $2 querySpecFile
-# $3 displayFormat
-#
-function run_query
-{
-  local queryFile="$1"
-  local querySpecFile="$2"
-  local displayFormat=$3
-
-  local error=0
-
-  local EXE=${zorbaExecDir}/apitest
-
-  if [ ! -e "${EXE}" ]; then
-    echo "ERROR 1 run_query: binary executable ${EXE} not found"
-    exit 17
-  fi
-
-  cd ${queryFile%/*}
-
-  #echo "queryFile = ${queryFile}"
-  #echo "querySpecFile = ${querySpecFile}"
-
-  if test -f $querySpecFile; then
-      XARGS=`egrep ^Args: ${querySpecFile} | cut -f2- -d:`
-      ERRS=`egrep ^Error: ${querySpecFile} | cut -f2- -d:`
-  else
-      XARGS=""
-      ERRS=""
-  fi
-
-  #echo "XARGS = ${XARGS}"
-
-  SEDARG=`echo ${testRootDir} | sed -r 's/\//\\\\\//g'`
-
-  echo "s/\$RBKT_SRC_DIR/$SEDARG/g" > sedargs
-
-  XARGS=`echo ${XARGS} | sed -f sedargs`
-
-  rm sedargs
-
-  if [ $displayFormat == "xml" ]; then
-    #echo "${EXE} ${XARGS} -r -o ${queryFile}.res ${queryFile} 2> ${queryFile}.err"
-    ${EXE} ${XARGS} -r -o "${queryFile}.res" "${queryFile}" 2> ${queryFile}.err
-  else
-    ${EXE} -o "${queryFile}.res" "${queryFile}" 2> "${queryFile}.err"
-  fi
-  error=$?
-  if [ ${error} != 0 ]; then
-    echo "ERROR 2 run_query: ${EXE} $1 failed with error code ${error}"
-    # To allow more queries to be run by the caller, do not propagate error
-  fi
-  
-  cd - >/dev/null
-
-  return 0
-}
-
-
-#
-# params
-#
-# $1 bucketName 
-# $2 queryName  
-# $3 displayFormat
-#
-function run_query_in_bucket
-{
-  local bucketName="$1"
-  local queryName="$2"
-  local displayFormat=$3
-
-  local error=0
-
-  local inputDir="${queriesDir}/${bucketName}"
-  local queryFile="${inputDir}/${queryName}.xq"
-  local querySpec="${inputDir}/${queryName}.spec"
-
-  local expResultsDir="${expQueryResultsDir}/${bucketName}"
-  local fmtExt=""
-  if [ $displayFormat == "xml" ]; then
-    fmtExt="xml"
-  else
-    fmtExt="show"
-  fi
-  local expResultFile="${expResultsDir}/${queryName}.${fmtExt}.res"
-
-  local resultsDir="${queryResultsDir}/${bucketName}"
-  local resultFile="${resultsDir}/${queryName}.${fmtExt}.res"
-  local errorsFile="${resultsDir}/${queryName}.${fmtExt}.err"
-  local diffFile="${resultsDir}/${queryName}.${fmtExt}.diff"
-
-  if [ ! -e "${queryFile}" ]; then
-    echo "ERROR 1 run_query_in_bucket: query file ${queryFile} does not exist"
-    return 17
-  fi
-
-  #
-  # Create results directory, if it doesn't exist already.
-  # If it exists, then clean it up.
-  #
-  mkdir -p "${resultsDir}"
-  if [ $? != 0 ]; then echo "ERROR 2 run_query_in_bucket: mkdir -p failed"; exit 19; fi
-  rm -f "${resultDir}"/${queryName}.*
-
-  #
-  # Run the query
-  #
-  run_query "${queryFile}" "${querySpec}" ${displayFormat}
-  error=$?
-  if [ ${error} != 0 ]; then
-    echo "ERROR 3 run_query_in_bucket: run_query failed with error code ${error}"
-    return ${error}
-  fi
-
-  #
-  # apitest creates the result file in the same dir as the query file.
-  # So, we must move the result file to the result dir.
-  #
-  # If no result file was generated, then we create an empty one.
-  #
-  if [ -s "${inputDir}/${queryName}.xq.res.err" ]; then
-      cat "${inputDir}/${queryName}.xq.res.err" | head -1 | cut -f1 -d':' > "${inputDir}/${queryName}.xq.res"
-  fi
-
-  mkdir -p `dirname ${resultFile}`
-  if [ -e "${inputDir}/${queryName}.xq.res" ]; then
-    mv "${inputDir}/${queryName}.xq.res" "${resultFile}"
-    if [ ! -f "${resultFile}" ]; then
-      echo "ERROR 12 run_query_in_bucket: could not create output file"; exit 19;
-    fi
-  else
-    touch "${resultFile}"
-    if [ $? != 0 ]; then
-      echo "ERROR 13 run_query_in_bucket: touch failed"; exit 19;
-    fi
-  fi
-
-  if [ -e "${inputDir}/${queryName}.xq.err" ]; then
-    mv "${inputDir}/${queryName}.xq.err" ${errorsFile}
-  fi
-
-  #
-  # Do the diffs
-  #
-  if [ -e "${expResultFile}" ]; then
-    cat "${expResultFile}" | diff -I '^Duration.*:' "${resultFile}" - > "${diffFile}"
-    #cat "${expResultFile}" | diff -I '^Duration.*:' "${resultFile}" - > "${diffFile}"
-  else
-    echo "Missing expected results for ${queryName}"
-    cp "${queryFile}" "${diffFile}"
-    if [ $? != 0 ]; then echo "ERROR 21 run_query_in_bucket: cp failed"; exit 19; fi
-  fi
-
-  if [ -s "${diffFile}" ]; then
-    echo "FAILURE: ${bucketName} / ${queryName}"
-    echo
-    echo >> rbkt_summary.txt
-    echo "FAILURE : -bucket ${bucketName} -query ${queryName}" >> rbkt_summary.txt
-    echo >> rbkt_summary.txt
-    let failedQueries=failedQueries+1 
-  else
-    echo "SUCCESS: ${bucketName} / ${queryName}"
-    echo
-  fi
-
-  let totalQueries=totalQueries+1
-
-  return 0
-}
-
-
-#
-# params:
-#
-# $1 bucketName
-# $2 displayFormat
-#
-function run_bucket() 
-{
-  local bucketName="$1"
-  local displayFormat=$2
-  local error=0
-  local queryList=""
-  local q=""
-  local queryName=""
-
-  if [ ! -e "${queriesDir}/${bucketName}" ]; then
-    echo "ERROR 1 run_bucket: bucket ${queriesDir}/${bucketName} does not exist"
-    return 17
-  fi
-
-  queryList=`mktemp`
-  (cd "${queriesDir}/${bucketName}"; find . -name '*.xq' | cut -f2- -d/ ) > $queryList
-  
-  # Uses fd 3 for reading queries.
-  # Nasty, but remember there can be many queries, and redirection
-  # applies for the entire while loop.
-  while read -u3 q; do
-    queryName=`echo $q | sed -e 's/.xq$//g'`
-    run_query_in_bucket "${bucketName}" "${queryName}" ${displayFormat}
-    error=$?
-    if [ ${error} != 0 ]; then
-      echo "ERROR 3 run_bucket: run_bucket failed with error code ${error}"
-      return ${error}
-    fi
-  done 3< $queryList
-
-  rm -f $queryList
-
-  return 0
-}
-
-
-################################################################################
-#                                                                              #
-#                                 Loading Docs                                 #
-#                                                                              #
-################################################################################
-
-
-#
-# $1 - docFile  : Full pathname of the file that contains the document text
-#
-function load_doc
-{
-  local error=0
-
-  local docFile="$1"
-
-  local EXE=${zorbaExecDir}/test_store
-
-  if [ ! -e "${EXE}" ]; then
-    echo "ERROR 1 load_doc: binary executable ${EXE} not found"
-    exit 17
-  fi
-
-  ${EXE} "${docFile}"
-  error=$?
-  if [ ${error} != 0 ]; then
-    echo "ERROR 2 load_doc: ${EXE} $1 failed with error code ${error}"
-    # To allow more docs to be loaded by the caller, do not propagate error
-  fi
-
-  return 0
-}
-
-
-#
-# $1 bucketName   : See load_bucket() function
-# $2 docName      : The doc name. 
-#
-function load_doc_in_bucket()
-{
-  local error=0
-
-  local bucketName="$1"
-  local docName="$2"
-
-  local inputDir="${docsDir}/${bucketName}"
-  local docFile="${inputDir}/${docName}.xml"
-
-  local expResultsDir="${expLoaderResultsDir}/${bucketName}"
-  local expResultFile="${expResultsDir}/${docName}.xml"
-
-  local resultsDir="${loaderResultsDir}/${bucketName}"
-  local resultFile="${resultsDir}/${docName}.xml"
-  local diffFile="${resultsDir}/${docName}.diff"
-
-  if [ ! -e "${docFile}" ]; then
-    echo "ERROR 1 load_doc_in_bucket: doc file ${docFile} does not exist"
-    return 17
-  fi
-
-  #
-  # Create results directory, if it doesn't exist already.
-  # If it exists, then clean it up.
-  #
-  mkdir -p "${resultsDir}"
-  if [ $? != 0 ]; then echo "ERROR 2 load_doc_in_bucket: mkdir -p failed"; exit 19; fi
-  rm -f "${resultsDir}"/${docName}.*
-
-  #
-  # Load the doc
-  #
-  load_doc "${docFile}"
-  error=$?
-  if [ ${error} != 0 ]; then
-    echo "ERROR 3 load_doc_in_bucket: load_doc failed with error code ${error}"
-    return ${error}
-  fi
-
-  #
-  # test_store creates the result file in the same dir as the doc file.
-  # So, we must move the result file to the result dir.
-  #
-  # If no result file was generated, then we create an empty one.
-  #
-  if [ -e "${inputDir}/${docName}.xml.res" ]; then
-    mv "${inputDir}/${docName}.xml.res" "${resultFile}"
-    if [ $? != 0 ]; then echo "ERROR 12 load_doc_in_bucket: mv failed"; exit 19; fi
-  else
-    touch "${resultFile}"
-    if [ $? != 0 ]; then echo "ERROR 13 load_doc_in_bucket: touch failed"; exit 19; fi
-  fi
-
-  #
-  # Do the diffs
-  #
-  if [ -e "${expResultFile}" ]; then
-    diff "${resultFile}" "${expResultFile}" > "${diffFile}"
-  else
-    echo "Missing expected results for ${docName}"
-    cp "${docFile}" "${diffFile}"
-    if [ $? != 0 ]; then echo "ERROR 21 load_doc_in_bucket: cp failed"; exit 19; fi
-  fi
-
-  if [ -s "${diffFile}" ]; then
-    echo
-    echo "FAILURE : -bucket ${bucketName} -doc ${docName}"
-    echo
-    let failedDocs=failedDocs+1 
-  else
-    echo
-    echo "SUCCESS : -bucket ${bucketName} -doc ${docName}"
-    echo
-  fi
-
-  let totalDocs=totalDocs+1
-
-  return 0
-}
-
-
-#
-# params:
-#
-# $1 bucketName
-#
-function load_bucket() 
-{
-  local error=0
-  local docList=""
-  local d=""
-  local docName=""
-  local bucketName="$1"
-
-  if [ ! -e "${docsDir}/${bucketName}" ]; then
-    echo "ERROR 1 load_bucket: bucket ${docsDir}/${bucketName} does not exist"
-    return 17
-  fi
-
-  cd "${docsDir}/${bucketName}"
-  docList=`ls *.xml`
-  cd - >/dev/null
-
-  for d in $docList
-  do
-    echo ${d} | sed -e s/".xml"/""/g  > tmp_docFile
-    for docName in `cat tmp_docFile`
-    do 
-      load_doc_in_bucket "${bucketName}" "${docName}"
-      error=$?
-      if [ ${error} != 0 ]; then
-        echo "ERROR 3 load_bucket: load_bucket failed with error code ${error}"
-        return ${error}
-      fi
-    done
-    rm -f tmp_docFile
-  done  
-
-  return 0
-}

=== removed file 'test/rbkt/Scripts/lbkt.sh.in'
--- test/rbkt/Scripts/lbkt.sh.in	2013-02-07 17:24:36 +0000
+++ test/rbkt/Scripts/lbkt.sh.in	1970-01-01 00:00:00 +0000
@@ -1,170 +0,0 @@
-#!/bin/bash
-# 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.
-
-zorbaRepos=@zorbaRepos@
-zorbaExecDir=@zorbaExecDir@
-
-error=0
-
-#
-# The environment variable zorbaRepos must be defined. It should point to a
-# directory containing a zorba source repository (e.g., /home/markos/zorba/xquery) 
-#
-if [ ! ${zorbaRepos} ]; then
-   echo "ERROR 1 lbkt.sh: zorbaRepos environment variable is not set"
-   exit 1
-fi
-
-
-#
-# The environment variable zorbaExeDir must be defined. It must be set to the
-# full pathname of the directory containig all the test executables
-#
-if [ ! ${zorbaExecDir} ]; then
-   echo "ERROR 1 lbkt.sh: zorbaExecDir environment variable is not set"
-   exit 1
-fi
-
-#
-# testRootDir is the root directory of the test environment. It contains the
-# the scripts, the test queries and their expected results, and the source docs
-# to be loaded. It is also under this directory where all output from the tests
-# is stored.
-#
-testRootDir=${zorbaRepos}/test/rbkt
-
-# The following dirs MUST exist under the testRootDir.
-scriptsDir=${testRootDir}/Scripts
-queriesDir=${testRootDir}/Queries
-expQueryResultsDir=${testRootDir}/ExpQueryResults
-docsDir=${testRootDir}/Documents
-expLoaderResultsDir=${testRootDir}/ExpLoaderResults
-
-# This is the dir where all query results are stored. This dir is created
-# by the buildDirEnv function, if it does not exist already.
-queryResultsDir=${testRootDir}/QueryResults
-
-# This is the dir where all loader results are stored. This dir is created
-# by the buildDirEnv function, if it does not exist already.
-loaderResultsDir=${testRootDir}/LoaderResults
-
-
-#
-# sourcing of common functions
-#
-if [ ! -e ${scriptsDir}/functions.sh ]; then
-   echo "ERROR 3 lbkt.sh: ${scriptsDir}/functions.sh does not exist"
-   exit 3
-fi
-
-source ${scriptsDir}/functions.sh
-
-trap '' 12
-
-#
-# Argument parsing
-#
-bucketName=""
-docName=""
-
-state=0
-while [ $1 ]
-do
-   case $1 in
-   -b)        state=1;;
-   -d)        state=2;;
-   -h)        usage ; exit;;
-    *) case $state in
-       1) bucketName="$1"; state=0 ;;
-       2) docName="$1"; state=0 ;;
-       *) echo "ERROR 6 lbkt.sh: Wrong parameter $1"; usage; exit 6;;
-       esac ;;
-    esac
-    shift
-done
-
-if [ $state -ne 0 ]; then
-  echo "ERROR 7 lbkt.sh: Wrong arg list"; usage; exit 7;
-fi
-
-
-#
-# Building env directories and runtime env
-#
-buildDirEnv
-error=$?
-if [ ${error} -ne 0 ]; then
-  echo "ERROR 10 lbkt.sh: buildDirEnv function failed with error code ${error}"
-  exit ${error}
-fi
-
-
-#
-# Load queries
-#
-#echo; echo "Loading Queries"
-failedDocs=0
-totalDocss=0
-
-rm -f lbkt_summary.txt
-
-if [ "${bucketName}" != "" ]; then
-
-  if [ "${docName}" != "" ]; then
-    load_doc_in_bucket "${bucketName}" "${docName}"
-    error=$?
-    if [ ${error} -ne 0 ]; then
-      echo "ERROR 70 lbkt.sh: load_doc_in_bucket function failed with error code ${error}"
-      exit ${error}
-    fi
-  else
-    echo; echo "Loading bucket ${bucketName}"
-    load_bucket "${bucketName}" 
-    error=$?
-    if [ ${error} -ne 0 ]; then
-      echo "ERROR 71 lbkt.sh: run_bucket function failed with error code ${error}"
-      exit ${error}
-    fi
-  fi
-
-else
-  #bucketList=`find "${queriesSDir}" -mindepth 1 -type d -printf "%f\n"`
-  bucketList="test"
-
-  for bucketName in ${bucketList}
-  do
-    echo; echo "Running bucket ${bucketName}"
-    load_bucket "${bucketName}"
-    error=$?
-    if [ ${error} -ne 0 ]; then
-      echo "ERROR 72 lbkt.sh: run_bucket function failed with error code ${error}"
-      exit ${error}
-    fi
-  done
-fi
-
-echo
-echo "lbkt.sh : total number of docs   = $totalDocs"
-echo "lbkt.sh : number of failed docs  = $failedDocs"
-
-echo >> lbkt_summary.txt
-echo "lbkt.sh : total number of docs   = $totalDocs" >> lbkt_summary.txt
-echo "lbkt.sh : number of failed docs  = $failedDocs" >> lbkt_summary.txt
-
-if [ ${failedDocs} -gt 0 ]; then
-  exit 1
-else
-   exit 0
-fi

=== removed file 'test/rbkt/Scripts/rbkt.sh.in'
--- test/rbkt/Scripts/rbkt.sh.in	2013-02-07 17:24:36 +0000
+++ test/rbkt/Scripts/rbkt.sh.in	1970-01-01 00:00:00 +0000
@@ -1,205 +0,0 @@
-#!/bin/bash
-# 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.
-
-error=0
-
-zorbaRepos=@zorbaRepos@
-zorbaExecDir=@zorbaExecDir@
-
-#
-# The environment variable zorbaRepos must be defined. It should point to a
-# directory containing a zorba source repository (e.g., /home/markos/zorba/xquery) 
-#
-if [ ! ${zorbaRepos} ]; then
-   echo "ERROR 1 rbkt.sh: zorbaRepos environment variable is not set"
-   exit 1
-fi
-
-
-#
-# The environment variable zorbaExe must be defined. It must be set to the
-# full pathname of the query_exec executable
-#
-if [ ! ${zorbaExecDir} ]; then
-   echo "ERROR 1 rbkt.sh: zorbaExecDir environment variable is not set"
-   exit 1
-fi
-
-#
-# testRootDir is the root directory of the test environment. It contains the
-# the scripts, the test queries and their expected results. It is also under
-# this directory where all output from the tests is stored.
-#
-testRootDir="${zorbaRepos}/test/rbkt"
-
-# The following dirs MUST exist under the testRootDir.
-scriptsDir=${testRootDir}/Scripts
-
-queriesDir=${testRootDir}/Queries
-expQueryResultsDir=${testRootDir}/ExpQueryResults
-docsDir=${testRootDir}/Documents
-expLoaderResultsDir=${testRootDir}/ExpLoaderResults
-
-# This is the dir where all query results are stored. This dir is created
-# by the buildDirEnv function, if it does not exist already.
-queryResultsDir=${testRootDir}/QueryResults
-
-# This is the dir where all loader results are stored. This dir is created
-# by the buildDirEnv function, if it does not exist already.
-loaderResultsDir=${testRootDir}/LoaderResults
-
-
-#
-# sourcing of common functions
-#
-if [ ! -e ${scriptsDir}/functions.sh ]; then
-   echo "ERROR 3 rbkt.sh: ${scriptsDir}/functions.sh does not exist"
-   exit 3
-fi
-
-source ${scriptsDir}/functions.sh
-
-trap '' 12
-
-#
-# Argument parsing
-#
-bucketList=""
-bucketName=""
-numBuckets=0
-queryName=""
-displayFormat="xml"
-
-state=0
-while [ $1 ]
-do
-   case $1 in
-   -b) state=1;;
-
-   -q) if [ $state -eq 0 -o $state -eq 1 -a $numBuckets -eq 1 ]; then
-         state=2;
-       else
-         echo "ERROR 5 rbkt.sh: Wrong option -q"; usage; exit 5;
-       fi ;;
-
-   -d) state=3;;
-
-   -h) usage ; exit;;
-
-    *) case $state in
-
-       1) if [ $numBuckets -eq 0 ]; then
-            bucketList="$1"
-          else
-            bucketList="${bucketList} $1";
-          fi 
-          let numBuckets=$numBuckets+1 ;;
-
-       2) queryName="$1"; state=0 ;;
-
-       3) displayFormat="$1"; state=0 ;;
-
-       *) echo "ERROR 6 rbkt.sh: Wrong parameter $1"; usage; exit 6;;
-       esac ;;
-    esac
-    shift
-done
-
-if [ $numBuckets -eq 1 ]; then
-  bucketName=$bucketList
-fi
-
-if [ $state -ne 0 -a $state -ne 1 ]; then
-  echo "ERROR 7 rbkt.sh: Wrong arg list"; usage; exit 7;
-fi
-
-if [ ${displayFormat} != "xml" -a ${displayFormat} != "show" ]; then
-  echo "ERROR 8 rbkt.sh: Wrong display format; must be xml or show"; exit 8;
-fi
-
-#
-# Building env directories and runtime env
-#
-buildDirEnv
-error=$?
-if [ ${error} -ne 0 ]; then
-  echo "ERROR 10 rbkt.sh: buildDirEnv function failed with error code ${error}"
-  exit ${error}
-fi
-
-
-#
-# Run queries
-#
-#echo; echo "Running Queries"
-failedQueries=0
-totalQueries=0
-
-rm -f rbkt_summary.txt
-
-if [ "${bucketName}" != "" ]; then
-
-  if [ "${queryName}" != "" ]; then
-    run_query_in_bucket "${bucketName}" "${queryName}" ${displayFormat}
-    error=$?
-    if [ ${error} -ne 0 ]; then
-      echo "ERROR 70 rbkt.sh: run_query_in_bucket function failed with error code ${error}"
-      exit ${error}
-    fi
-  else
-    echo; echo "Running bucket ${bucketName}"
-    run_bucket "${bucketName}" ${displayFormat}
-    error=$?
-    if [ ${error} -ne 0 ]; then
-      echo "ERROR 71 rbkt.sh: run_bucket function failed with error code ${error}"
-      exit ${error}
-    fi
-  fi
-
-else
-  if [ -z "${bucketList}" ]; then
-    # bugfix by Matthias (collect the buckets automatically)
-    bucketList=`find "${queriesDir}" -type d -maxdepth 1 ! -name '.svn' ! -name '.' ! -name 'Queries' -exec basename {} \;`
-  fi
-
-  echo "bucketList = $bucketList"
-
-  for bucketName in ${bucketList}
-  do
-    echo; echo "Running bucket ${bucketName}"
-    run_bucket "${bucketName}" ${displayFormat}
-    error=$?
-    if [ ${error} -ne 0 ]; then
-      echo "ERROR 72 rbkt.sh: run_bucket function failed with error code ${error}"
-      exit ${error}
-    fi
-  done
-fi
-
-echo
-echo "rbkt.sh : total number of queries   = $totalQueries"
-echo "rbkt.sh : number of failed queries  = $failedQueries"
-
-echo >> rbkt_summary.txt
-echo "rbkt.sh : number of failed queries  = $failedQueries" >> rbkt_summary.txt
-
-rm -f query.dot
-rm -f query.xml
-
-if [ ${failedQueries} -gt 0 ]; then
-  exit 1
-else
-   exit 0
-fi

=== removed file 'test/rbkt/Scripts/resultToXml.py.in'
--- test/rbkt/Scripts/resultToXml.py.in	2013-02-07 17:24:36 +0000
+++ test/rbkt/Scripts/resultToXml.py.in	1970-01-01 00:00:00 +0000
@@ -1,88 +0,0 @@
-#!/usr/bin/python
-
-""" Copyright 2009 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."""
-
-import string
-import sys
-
-ctest_failed_file = "@zorbaBuildDir@/Testing/Temporary/LastTestsFailed.log"
-ctest_log_file = "@zorbaBuildDir@/Testing/Temporary/LastTest.log"
-
-out_file = "@zorbaBuildDir@/result.xml"
-
-out = open ( out_file, 'w' )
-
-out.write ( '<?xml version="1.0" encoding="UTF-8"?>\n' )
-out.write ( '<test-suite-result\n' )
-out.write ( "   xmlns='http://www.w3.org/2005/02/query-test-XQTSResult'\n" )
-out.write ( '   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>\n' )
-out.write ( '   <implementation\n' )
-out.write ( '      name="Zorba"\n' )
-out.write ( '      version="@zorbaVersion@">\n' )
-out.write ( '   <organization\n' )
-out.write ( '      name="FLWOR Foundation"\n' )
-out.write ( '      website="http://www.zobra-xquery.com />"\n' )
-out.write ( '   <subittor\n' )
-out.write ( '       name="Timh Kraska"\n' )
-out.write ( '       email="tim.kraska@xxxxxxxxxxx" />\n' )
-out.write ( '    <description>\n' )
-out.write ( '    <p>Zorba is a XQuery processor writtenin C++ available under the Apache License.</p>\n' )
-out.write ( '     </description>\n' )
-
-
-def has_testing ( s ):
-    yes = string.find ( s, 'Testing:' )
-    yes2 = s.find ( 'w3c_testsuite' )
-    return yes > 0 and yes2 > 0 
-
-def get_test_name ( s ) :
-    words = string.split ( s, '/' )
-    l = len ( words )
-    name = words[ l -1]
-    name = string.strip ( name )
-    return name
-
-try:
-    failedfile = open ( ctest_failed_file, 'r' )
-    failed = True
-except IOError :
-    print "CTest failed log not found"
-    print "Assuming that CTest was run and that there were no failures"
-    failed = False
-
-failures = set()
-if failed :
-    for line in failedfile:
-        i = string.find ( line, "w3c_testsuite" )
-        if i > 0 :
-            name = get_test_name ( line )
-            failures.add ( name )
-
-try:
-    file = open ( ctest_log_file, 'r' )
-except IOError :
-    print "Ctest log file not found"
-    print "Run CTest before this script"
-    sys.exit ( 1 )
-
-for line in file:
-    if has_testing ( line ):
-        name = get_test_name ( line )
-        if  name in failures :
-            out.write ( '<test-case name="%s" result="failed" />\n' % name )
-        else :
-            out.write ( '<test-case name="%s" result="passed" />\n' % name )
-
-out.write ( '</test-suite-result>' )

=== removed file 'test/rbkt/Scripts/tidy_xmlfrag'
--- test/rbkt/Scripts/tidy_xmlfrag	2013-02-07 17:24:36 +0000
+++ test/rbkt/Scripts/tidy_xmlfrag	1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
-# 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
-perl -pe 's#<([^> ]+)([^>]*?)/ *>#<$1 $2></$1>#g;s/^<\?xml[^>]*\?>//g' | (echo '<root>'; cat; echo '</root>') | tidy -q -xml -indent 2>/dev/null

=== removed file 'test/rbkt/Scripts/xqftts.sh'
--- test/rbkt/Scripts/xqftts.sh	2013-02-07 17:24:36 +0000
+++ test/rbkt/Scripts/xqftts.sh	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-#!/bin/bash
-
-# This shell script checks out a fresh XQFTTS from W3C and creates a new XQFTTS_current.zip
-# W3C provides an ANT script for all their tesuites (XQTS, XQUTS, XQFTTS)
-
-xqfttsDir=XQFTTS/2007/xpath-full-text-10-test-suite
-
-export CVSROOT=":pserver:anonymous@xxxxxxxxxx:/sources/public"
-cvs login
-
-#echo: checking out the Full test test suite (XQFTTS)
-#cd $xqfttsDir/../
-#cvs get2007/xpath-full-text-10-test-suite xpath-full-text-10-test-suite
-
-echo get updates (the password is anonymous)
-cd $xqfttsDir
-cvs update
-
-echo create new XQFTTS_development.zip archive
-echo NOTE: Ant (the build generator for Java) is a requirement for this
-cd $xqfttsDir/Tools/ZipXQTS
-ant -buildfile Build.xml
-
-echo copy the new XQFTTS_development.zip archive to /tmp/XQFTTS_current.zip
-echo Note: the name of the .ZIP in /tmp folder has to match the name in the import_w3c_full_text_testsuite.sh
-echo       for the ZIP variable at line 58
-cp $xqfttsDir/PublicPagesStagingArea/XQFTTS_development.zip /tmp/XQFTTS_current.zip
-
-echo now, if you comment the lines that download the .ZIP from W3C (lines 59 and 60) 
-echo and run the import_w3c_full_text_testsuite.sh you are all set !
\ No newline at end of file

=== modified file 'test/sax2/CMakeLists.txt'
--- test/sax2/CMakeLists.txt	2013-02-26 04:12:43 +0000
+++ test/sax2/CMakeLists.txt	2013-05-16 08:27:29 +0000
@@ -12,19 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# configure the testdriver
-CONFIGURE_FILE(sax2testdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/sax2testdriverconfig.h)
-
-# Compile and build the testdriver executable
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/test/commons)
-
-SET (SAX2_TESTDRIVER_SRCS
-  sax2testdriver.cpp
-  ${CMAKE_SOURCE_DIR}/test/commons/testdriver_comparator.cpp
-  )
-
-ZORBA_GENERATE_EXE(sax2testdriver "${SAX2_TESTDRIVER_SRCS}" "" "" "")
 
 # Compute results directory for testdriver
 SET (_results_dir "${CMAKE_CURRENT_BINARY_DIR}/QueryResults")

=== removed file 'test/sax2/sax2testdriverconfig.h.in'
--- test/sax2/sax2testdriverconfig.h.in	2013-02-07 17:24:36 +0000
+++ test/sax2/sax2testdriverconfig.h.in	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef XQP_SAX2_TESTDRIVER_CONFIG_H
-#define XQP_SAX2_TESTDRIVER_CONFIG_H
-
-namespace zorba {
-
-static std::string SAX2_SRC_DIR = "@CMAKE_CURRENT_SOURCE_DIR@";
-static std::string SAX2_BINARY_DIR = "@CMAKE_CURRENT_BINARY_DIR@";
-
-}
-#endif

=== removed file 'test/timer.h'
--- test/timer.h	2013-02-07 17:24:36 +0000
+++ test/timer.h	1970-01-01 00:00:00 +0000
@@ -1,73 +0,0 @@
-/*
- * 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.
- */
-/**
- * Class to measure execution time based on CPU clocks and system time.
- * made by Dongseop Kwon (subby@xxxxxxxxxxxx), 23/07/2003
- */
-
-
-#ifndef ZORBA_TIMER_H
-#define ZORBA_TIMER_H
-
-#include <ctime>
-#ifndef WIN32
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif
-
-#include <iostream>
-
-
-class Timer
-{
-    clock_t startClock;
-    clock_t suspendClock;
-    clock_t endClock;
-
-#ifndef WIN32
-    double startTime;
-    double endTime;
-    double suspendTime;
-#endif
-
-		bool suspended;
-    bool running;
-    bool verbose;
-
-public:
-    // timer routines
-    void start();
-    void end();
-    void suspend();
-    void resume();
-
-    double getClock();
-    double getTime();
-
-    // print all information
-    std::ostream& print(std::ostream& os);
-    bool isRunning();
-
-  Timer(bool start = true, bool verbose = false);
-};
-#endif
-
-/*
- * Local variables:
- * mode: c++
- * End:
- */

=== modified file 'test/unit/CMakeLists.txt'
--- test/unit/CMakeLists.txt	2013-05-14 09:59:59 +0000
+++ test/unit/CMakeLists.txt	2013-05-16 08:27:29 +0000
@@ -119,6 +119,7 @@
 )
 
 # add the executable
+INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}/test/driver")
 ZORBA_GENERATE_EXE(UnitTests "${UnitTests}" "" "" "")
 
 # remove the test driver source file

=== modified file 'test/unit/cxx_api_changes.cpp'
--- test/unit/cxx_api_changes.cpp	2013-02-07 17:24:36 +0000
+++ test/unit/cxx_api_changes.cpp	2013-05-16 08:27:29 +0000
@@ -29,7 +29,7 @@
 #include <zorba/xquery_exception.h>
 
 
-#include "rbkt/testdriverconfig.h"
+#include <testdriverconfig.h>
 
 using namespace zorba;
 

=== modified file 'test/update/CMakeLists.txt'
--- test/update/CMakeLists.txt	2013-02-26 04:12:43 +0000
+++ test/update/CMakeLists.txt	2013-05-16 08:27:29 +0000
@@ -12,22 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# configure the testdriver
-CONFIGURE_FILE(testdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/testdriverconfig.h)
-
-# Compile and build the testdriver executable
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/test/commons)
-
-SET(UPDTESTDRIVER_SRCS
-    updtestdriver.cpp
-    ${CMAKE_SOURCE_DIR}/test/commons/testdriver_comparator.cpp
-    ${CMAKE_SOURCE_DIR}/test/commons/testuriresolver.cpp)
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-
-INCLUDE(${CMAKE_SOURCE_DIR}/cmake_modules/ZorbaGenerateExe.cmake)
-ZORBA_GENERATE_EXE("updtestdriver" "${UPDTESTDRIVER_SRCS}" "" "" "")
 
 # collect all spec files (suffix .spec) in all subdirectories of the Queries dir
 FILE(GLOB_RECURSE TESTFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/Queries/ FOLLOW_SYMLINKS "*.spec")

=== removed file 'test/update/testdriverconfig.h.in'
--- test/update/testdriverconfig.h.in	2013-02-07 17:24:36 +0000
+++ test/update/testdriverconfig.h.in	1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
-/*                                                                                                      
- * 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.
- */
-#ifndef XQP_UPDATE_TESTDRIVER_CONFIG_H
-#define XQP_UPDATE_TESTDRIVER_CONFIG_H
-
-namespace zorba {
-
-#cmakedefine ZORBA_TEST_PLAN_SERIALIZATION
-
-static std::string UPDATE_SRC_DIR = "@CMAKE_CURRENT_SOURCE_DIR@";
-static std::string UPDATE_BINARY_DIR = "@CMAKE_CURRENT_BINARY_DIR@";
-
-}
-#endif


Follow ups