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

Proposed by Chris Hillery
Status: Merged
Approved by: Chris Hillery
Approved revision: 11459
Merged at revision: 11459
Proposed branch: lp:~zorba-coders/zorba/prune-rbkt
Merge into: lp:zorba
Diff against target: 1794 lines (+127/-1375)
32 files modified
test/CMakeLists.txt (+2/-1)
test/driver/CMakeLists.txt (+97/-0)
test/driver/sax2testdriver.cpp (+1/-1)
test/driver/specification.h (+1/-1)
test/driver/testdriverconfig.h.in (+11/-6)
test/driver/updtestdriver.cpp (+1/-1)
test/rbkt/CMakeLists.txt (+1/-76)
test/rbkt/Documents/test/bad2.xml (+0/-3)
test/rbkt/Documents/test/test1.xml (+0/-6)
test/rbkt/Documents/test/test2.xml (+0/-5)
test/rbkt/Documents/test/test3.xml (+0/-6)
test/rbkt/Documents/test/test4.xml (+0/-15)
test/rbkt/ExpLoaderResults/test/test1.xml (+0/-8)
test/rbkt/ExpLoaderResults/test/test2.xml (+0/-8)
test/rbkt/ExpLoaderResults/test/test3.xml (+0/-8)
test/rbkt/ExpLoaderResults/test/test4.xml (+0/-17)
test/rbkt/Queries/CMakeLists.txt (+11/-5)
test/rbkt/Scripts/CMakeLists.txt (+0/-23)
test/rbkt/Scripts/cmp_ctest_logs (+0/-32)
test/rbkt/Scripts/functions.sh (+0/-489)
test/rbkt/Scripts/lbkt.sh.in (+0/-170)
test/rbkt/Scripts/rbkt.sh.in (+0/-205)
test/rbkt/Scripts/resultToXml.py.in (+0/-88)
test/rbkt/Scripts/tidy_xmlfrag (+0/-15)
test/rbkt/Scripts/xqftts.sh (+0/-30)
test/sax2/CMakeLists.txt (+0/-13)
test/sax2/sax2testdriverconfig.h.in (+0/-26)
test/timer.h (+0/-73)
test/unit/CMakeLists.txt (+1/-0)
test/unit/cxx_api_changes.cpp (+1/-1)
test/update/CMakeLists.txt (+0/-16)
test/update/testdriverconfig.h.in (+0/-27)
To merge this branch: bzr merge lp:~zorba-coders/zorba/prune-rbkt
Reviewer Review Type Date Requested Status
Juan Zacarias Approve
Chris Hillery Approve
Review via email: mp+164088@code.launchpad.net

Commit message

Consolidate all test driver sources into one place. Eliminate stale and unused scripts and source.

To post a comment you must log in.
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~zorba-coders/zorba/prune-rbkt into lp:zorba failed. Below is the output from the failed tests.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job prune-rbkt-2013-05-16T09-22-43.725Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1, Needs Information < 1, Resubmit < 1. Got: 1 Pending.

Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Juan Zacarias (juan457) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job prune-rbkt-2013-05-16T20-29-09.958Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'test/CMakeLists.txt'
--- test/CMakeLists.txt 2013-05-14 10:07:03 +0000
+++ test/CMakeLists.txt 2013-05-16 09:25:46 +0000
@@ -23,11 +23,12 @@
2323
24INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/src)24INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/src)
25INCLUDE_DIRECTORIES(BEFORE ${CMAKE_BINARY_DIR}/src)25INCLUDE_DIRECTORIES(BEFORE ${CMAKE_BINARY_DIR}/src)
26INCLUDE_DIRECTORIES(BEFORE ${CMAKE_BINARY_DIR}/test)
27INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})26INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
2827
29INCLUDE(${CMAKE_SOURCE_DIR}/cmake_modules/ZorbaGenerateExe.cmake)28INCLUDE(${CMAKE_SOURCE_DIR}/cmake_modules/ZorbaGenerateExe.cmake)
3029
30INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/driver)
31ADD_SUBDIRECTORY(driver)
31ADD_SUBDIRECTORY(api)32ADD_SUBDIRECTORY(api)
32ADD_SUBDIRECTORY(rbkt)33ADD_SUBDIRECTORY(rbkt)
33ADD_SUBDIRECTORY(extern)34ADD_SUBDIRECTORY(extern)
3435
=== 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 09:25:46 +0000
@@ -0,0 +1,97 @@
1# Copyright 2006-2013 The FLWOR Foundation.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# configure the testdrivers
16CONFIGURE_FILE(testdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/testdriverconfig.h)
17INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
18
19
20#
21# Compile and build the testdriver executable
22#
23SET (TESTDRIVER_SRCS
24 testdriver.cpp
25 testdriver_common.cpp
26 testdriver_comparator.cpp
27 testuriresolver.cpp
28 )
29
30ZORBA_GENERATE_EXE("testdriver" "${TESTDRIVER_SRCS}" "" "" "bin")
31
32#
33# Compile and build the multi-threaded testdriver executable, if boost
34# available
35#
36
37FIND_PACKAGE(Boost COMPONENTS filesystem)
38IF (NOT Boost_FILESYSTEM_FOUND)
39 MESSAGE(STATUS "Boost filesystem or system component not found - not building multithreaded test driver")
40ELSE (NOT Boost_FILESYSTEM_FOUND)
41 MESSAGE(STATUS "Found Boost v${Boost_LIB_VERSION}: ${Boost_INCLUDE_DIRS}")
42 MESSAGE(STATUS " Boost lib path: ${Boost_LIBRARY_DIRS}")
43
44 # Assume this is OK for the moment...
45 SET (ZORBATEST_TESTDRIVER_MT_AVAILABLE TRUE)
46
47 IF (Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION GREATER 34)
48 # Boost 1.35 and above included a separate "system" component. In
49 # at least some versions, filesystem depends on system - and the
50 # Mac linker apparently does not figure this out. Therefore we
51 # need to link it explicitly, which means we need to find it
52 # first.
53 FIND_PACKAGE(Boost COMPONENTS system)
54 IF (NOT Boost_SYSTEM_FOUND)
55 MESSAGE(STATUS "Did NOT find Boost SYSTEM component - not building multithreaded test driver")
56 SET (ZORBATEST_TESTDRIVER_MT_AVAILABLE FALSE)
57 ELSE (NOT Boost_SYSTEM_FOUND)
58 SET (Boost_system_lib "boost_system-mt")
59 ENDIF (NOT Boost_SYSTEM_FOUND)
60
61 ENDIF (Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION GREATER 34)
62
63ENDIF (NOT Boost_FILESYSTEM_FOUND)
64
65IF (ZORBATEST_TESTDRIVER_MT_AVAILABLE)
66 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
67
68 SET (TESTDRIVER_MT_SRCS
69 testdriver_mt.cpp
70 testdriver_common.cpp
71 testdriver_comparator.cpp
72 testuriresolver.cpp
73 )
74
75 ZORBA_GENERATE_EXE(
76 "testdriver_mt" "${TESTDRIVER_MT_SRCS}" "${Boost_LIBRARIES}" "" "")
77
78 SET (ZORBATEST_USE_MT_XQTS NO CACHE BOOLEAN
79 "If true, use testdriver_mt (when available) for running XQTS")
80 MARK_AS_ADVANCED (ZORBATEST_USE_MT_XQTS)
81
82ENDIF (ZORBATEST_TESTDRIVER_MT_AVAILABLE)
83
84# Compile and build the update testdriver executable
85SET(UPDTESTDRIVER_SRCS
86 updtestdriver.cpp
87 testdriver_comparator.cpp
88 testuriresolver.cpp)
89ZORBA_GENERATE_EXE("updtestdriver" "${UPDTESTDRIVER_SRCS}" "" "" "")
90
91# Compile and build the SAX2 test driver executable
92SET (SAX2_TESTDRIVER_SRCS
93 sax2testdriver.cpp
94 ${CMAKE_SOURCE_DIR}/test/driver/testdriver_comparator.cpp
95 )
96
97ZORBA_GENERATE_EXE(sax2testdriver "${SAX2_TESTDRIVER_SRCS}" "" "" "")
098
=== 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 09:25:46 +0000
@@ -26,7 +26,7 @@
2626
27#include <zorba/util/file.h>27#include <zorba/util/file.h>
2828
29#include "sax2testdriverconfig.h" // SRC and BIN dir definitions29#include "testdriverconfig.h" // SRC and BIN dir definitions
3030
31#include <zorba/zorba.h>31#include <zorba/zorba.h>
32#include <zorba/default_content_handler.h>32#include <zorba/default_content_handler.h>
3333
=== 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 09:25:46 +0000
@@ -22,7 +22,7 @@
22#include <sstream>22#include <sstream>
23#include <util/ascii_util.h>23#include <util/ascii_util.h>
24#include <zorba/util/uri.h>24#include <zorba/util/uri.h>
25#include <testuriresolver.h>25#include "testuriresolver.h"
26#include <zorba/uri_resolvers.h>26#include <zorba/uri_resolvers.h>
2727
28#undef WIN32_LEAN_AND_MEAN28#undef WIN32_LEAN_AND_MEAN
2929
=== 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 09:25:46 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2006-2008 The FLWOR Foundation.2 * Copyright 2006-2013 The FLWOR Foundation.
3 *3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.5 * you may not use this file except in compliance with the License.
@@ -14,8 +14,8 @@
14 * limitations under the License.14 * limitations under the License.
15 */15 */
1616
17#ifndef XQP_RBKT_TESTDRIVER_CONFIG_H17#ifndef ZORBA_TESTDRIVER_CONFIG_H
18#define XQP_RBKT_TESTDRIVER_CONFIG_H18#define ZORBA_TESTDRIVER_CONFIG_H
1919
20#cmakedefine ZORBA_TEST_XQUERYX20#cmakedefine ZORBA_TEST_XQUERYX
2121
@@ -25,8 +25,13 @@
2525
26namespace zorba {26namespace zorba {
2727
28static std::string RBKT_SRC_DIR = "@CMAKE_CURRENT_SOURCE_DIR@";28static std::string RBKT_SRC_DIR = "@CMAKE_SOURCE_DIR@/test/rbkt";
29static std::string RBKT_BINARY_DIR = "@CMAKE_CURRENT_BINARY_DIR@";29static std::string RBKT_BINARY_DIR = "@CMAKE_BINARY_DIR@/test/rbkt";
30static std::string CMAKE_BINARY_DIR = "@CMAKE_BINARY_DIR@";30static std::string CMAKE_BINARY_DIR = "@CMAKE_BINARY_DIR@";
31static std::string UPDATE_SRC_DIR = "@CMAKE_SOURCE_DIR@/test/update";
32static std::string UPDATE_BINARY_DIR = "@CMAKE_BINARY_DIR@/test/update";
33static std::string SAX2_SRC_DIR = "@CMAKE_SOURCE_DIR@/test/sax2";
34static std::string SAX2_BINARY_DIR = "@CMAKE_BINARY_DIR@/test/sax2";
35
31}36}
32#endif37#endif /* ZORBA_TESTDRIVER_CONFIG_H */
3338
=== 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 09:25:46 +0000
@@ -26,7 +26,7 @@
2626
27#include "testdriverconfig.h" // SRC and BIN dir definitions27#include "testdriverconfig.h" // SRC and BIN dir definitions
28#include "testuriresolver.h"28#include "testuriresolver.h"
29#include "specification.h" // parsing spec files29#include "updspecification.h" // parsing spec files
30#include "common/common.h"30#include "common/common.h"
3131
32#include <zorba/zorba.h>32#include <zorba/zorba.h>
3333
=== modified file 'test/rbkt/CMakeLists.txt'
--- test/rbkt/CMakeLists.txt 2013-02-26 04:12:43 +0000
+++ test/rbkt/CMakeLists.txt 2013-05-16 09:25:46 +0000
@@ -1,4 +1,4 @@
1# Copyright 2006-2008 The FLWOR Foundation.1# Copyright 2006-2013 The FLWOR Foundation.
2# 2#
3# Licensed under the Apache License, Version 2.0 (the "License");3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.4# you may not use this file except in compliance with the License.
@@ -12,86 +12,11 @@
12# See the License for the specific language governing permissions and12# See the License for the specific language governing permissions and
13# limitations under the License.13# limitations under the License.
1414
15ADD_SUBDIRECTORY(Scripts)
16ADD_SUBDIRECTORY(ExpCompilerResults)15ADD_SUBDIRECTORY(ExpCompilerResults)
1716
18# configure the testdriver
19CONFIGURE_FILE(testdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/testdriverconfig.h)
20
21# configure itertest17# configure itertest
22CONFIGURE_FILE(itertest.xq.in ${CMAKE_CURRENT_BINARY_DIR}/itertest.xq)18CONFIGURE_FILE(itertest.xq.in ${CMAKE_CURRENT_BINARY_DIR}/itertest.xq)
2319
24#
25# Compile and build the testdriver executable
26#
27INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
28INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/test/commons)
29
30SET (TESTDRIVER_SRCS
31 testdriver.cpp
32 testdriver_common.cpp
33 ${CMAKE_SOURCE_DIR}/test/commons/testdriver_comparator.cpp
34 ${CMAKE_SOURCE_DIR}/test/commons/testuriresolver.cpp
35 )
36
37INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
38INCLUDE(ZorbaGenerateExe)
39ZORBA_GENERATE_EXE("testdriver" "${TESTDRIVER_SRCS}" "" "" "bin")
40#SET_TARGET_PROPERTIES(testdriver PROPERTIES OUTPUT_NAME zorba-testdriver)
41
42
43#
44# Compile and build the multi-threaded testdriver executable, if boost
45# available
46#
47
48FIND_PACKAGE(Boost COMPONENTS filesystem)
49IF (NOT Boost_FILESYSTEM_FOUND)
50 MESSAGE(STATUS "Boost filesystem or system component not found - not building multithreaded test driver")
51ELSE (NOT Boost_FILESYSTEM_FOUND)
52 MESSAGE(STATUS "Found Boost v${Boost_LIB_VERSION}: ${Boost_INCLUDE_DIRS}")
53 MESSAGE(STATUS " Boost lib path: ${Boost_LIBRARY_DIRS}")
54
55 # Assume this is OK for the moment...
56 SET (ZORBATEST_TESTDRIVER_MT_AVAILABLE TRUE)
57
58 IF (Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION GREATER 34)
59 # Boost 1.35 and above included a separate "system" component. In
60 # at least some versions, filesystem depends on system - and the
61 # Mac linker apparently does not figure this out. Therefore we
62 # need to link it explicitly, which means we need to find it
63 # first.
64 FIND_PACKAGE(Boost COMPONENTS system)
65 IF (NOT Boost_SYSTEM_FOUND)
66 MESSAGE(STATUS "Did NOT find Boost SYSTEM component - not building multithreaded test driver")
67 SET (ZORBATEST_TESTDRIVER_MT_AVAILABLE FALSE)
68 ELSE (NOT Boost_SYSTEM_FOUND)
69 SET (Boost_system_lib "boost_system-mt")
70 ENDIF (NOT Boost_SYSTEM_FOUND)
71
72 ENDIF (Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION GREATER 34)
73
74ENDIF (NOT Boost_FILESYSTEM_FOUND)
75
76IF (ZORBATEST_TESTDRIVER_MT_AVAILABLE)
77 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
78
79 SET (TESTDRIVER_MT_SRCS
80 testdriver_mt.cpp
81 testdriver_common.cpp
82 ${CMAKE_SOURCE_DIR}/test/commons/testdriver_comparator.cpp
83 ${CMAKE_SOURCE_DIR}/test/commons/testuriresolver.cpp
84 )
85
86 ZORBA_GENERATE_EXE(
87 "testdriver_mt" "${TESTDRIVER_MT_SRCS}" "${Boost_LIBRARIES}" "" "")
88
89 SET (ZORBATEST_USE_MT_XQTS NO CACHE BOOLEAN
90 "If true, use testdriver_mt (when available) for running XQTS")
91 MARK_AS_ADVANCED (ZORBATEST_USE_MT_XQTS)
92
93ENDIF (ZORBATEST_TESTDRIVER_MT_AVAILABLE)
94
95# The NO_CTEST variable can be set to 1 so that CMake does not search20# The NO_CTEST variable can be set to 1 so that CMake does not search
96# for and add most of the Zorba tests, to speed up building and21# for and add most of the Zorba tests, to speed up building and
97# compiling the project.22# compiling the project.
9823
=== 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 @@
1<test:Plan xmlns:test='http://test.org/schema'
2 <test:Case name='test1' emptyAttribute='' test:ns_id='auio'>
3 </test:Case>
40
=== 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 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<test:Plan xmlns:test='http://test.org/schema'>
3 <test:Case name='test1' emptyAttribute='' test:ns_id='auio'>
4 </test:Case>
5 <test:text>my name <b>is</b> foo</test:text>
6</test:Plan>
70
=== 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 @@
1<test:Plan xmlns:test='http://test.org/schema'>
2 <test:Case name='test1' emptyAttribute='' test:ns_id='auio'>
3 </test:Case>
4 <test:text>my name <b>is</b> foo</test:text>
5</test:Plan>
60
=== 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 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<test:Plan xmlns:test='http://test.org/schema'>
3 <test:Case name='test1' emptyAttribute='' test:ns_id='auio'>
4 </test:Case><!-- this is a comment -->
5 <test:text>my name <b>is</b> &lt;foo&gt; and <![CDATA[this is some < &amp; cdata>]]> </test:text>
6</test:Plan>
70
=== 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 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<plan>
3 <test:Case xmlns:test='http://test.org/schema' name='test1' emptyAttribute='' test:ns_id='auio'>
4 </test:Case><!-- this is a comment -->
5 <test:text xmlns:test='http://test.org/schema2'>my name <b>is</b> foo></test:text>
6 <text>this is some more text</text>
7 <pre:foo xmlns:pre='http://test.org/pre1'>
8 <pre:boo1/>
9 <pre:boo2/>
10 <pre:boo3> <goo1/> <goo2 xmlns:gg='http://test.org/schema3'/> </pre:boo3>
11 <pre:boo4>
12 <pre:goo3 xmlns:pre='http://test.org/pre2'/>
13 </pre:boo4>
14 </pre:foo>
15</plan>
160
=== removed directory 'test/rbkt/ExpLoaderResults'
=== removed directory 'test/rbkt/ExpLoaderResults/test'
=== removed file 'test/rbkt/ExpLoaderResults/test/test1.xml'
--- test/rbkt/ExpLoaderResults/test/test1.xml 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpLoaderResults/test/test1.xml 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<document baseUri = "" docUri = "zorba://internalDocumentURI-1">
3<test:Plan nid="50 1.1" xmlns:test="http://test.org/schema">
4 <test:Case nid="5a 1.1.3" xmlns:test="http://test.org/schema" name="xs:untypedAtomic(test1)" emptyAttribute="xs:untypedAtomic()" test:ns_id="xs:untypedAtomic(auio)">
5 </test:Case>
6 <test:text nid="5d80 1.1.7" xmlns:test="http://test.org/schema">my name <b nid="5dd0 1.1.7.3" xmlns:test="http://test.org/schema">is</b> foo</test:text>
7</test:Plan>
8</document>
90
=== removed file 'test/rbkt/ExpLoaderResults/test/test2.xml'
--- test/rbkt/ExpLoaderResults/test/test2.xml 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpLoaderResults/test/test2.xml 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<document baseUri = "" docUri = "zorba://internalDocumentURI-1">
3<test:Plan nid="50 1.1" xmlns:test="http://test.org/schema">
4 <test:Case nid="5a 1.1.3" xmlns:test="http://test.org/schema" name="xs:untypedAtomic(test1)" emptyAttribute="xs:untypedAtomic()" test:ns_id="xs:untypedAtomic(auio)">
5 </test:Case>
6 <test:text nid="5d80 1.1.7" xmlns:test="http://test.org/schema">my name <b nid="5dd0 1.1.7.3" xmlns:test="http://test.org/schema">is</b> foo</test:text>
7</test:Plan>
8</document>
90
=== removed file 'test/rbkt/ExpLoaderResults/test/test3.xml'
--- test/rbkt/ExpLoaderResults/test/test3.xml 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpLoaderResults/test/test3.xml 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<document baseUri = "" docUri = "zorba://internalDocumentURI-1">
3<test:Plan nid="50 1.1" xmlns:test="http://test.org/schema">
4 <test:Case nid="5a 1.1.3" xmlns:test="http://test.org/schema" name="xs:untypedAtomic(test1)" emptyAttribute="xs:untypedAtomic()" test:ns_id="xs:untypedAtomic(auio)">
5 </test:Case><!-- this is a comment -->
6 <test:text nid="5e10 1.1.9" xmlns:test="http://test.org/schema">my name <b nid="5e1a 1.1.9.3" xmlns:test="http://test.org/schema">is</b> <foo> and this is some < &amp; cdata> </test:text>
7</test:Plan>
8</document>
90
=== removed file 'test/rbkt/ExpLoaderResults/test/test4.xml'
--- test/rbkt/ExpLoaderResults/test/test4.xml 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpLoaderResults/test/test4.xml 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<document baseUri = "" docUri = "zorba://internalDocumentURI-1">
3<plan nid="50 1.1">
4 <test:Case nid="5a 1.1.3" xmlns:test="http://test.org/schema" name="xs:untypedAtomic(test1)" emptyAttribute="xs:untypedAtomic()" test:ns_id="xs:untypedAtomic(auio)">
5 </test:Case><!-- this is a comment -->
6 <test:text nid="5e10 1.1.9" xmlns:test="http://test.org/schema2">my name <b nid="5e1a 1.1.9.3" xmlns:test="http://test.org/schema2">is</b> foo></test:text>
7 <text nid="5e50 1.1.13">this is some more text</text>
8 <pre:foo nid="5e90 1.1.17" xmlns:pre="http://test.org/pre1">
9 <pre:boo1 nid="5e9a 1.1.17.3" xmlns:pre="http://test.org/pre1"></pre:boo1>
10 <pre:boo2 nid="5e9d80 1.1.17.7" xmlns:pre="http://test.org/pre1"></pre:boo2>
11 <pre:boo3 nid="5e9e30 1.1.17.11" xmlns:pre="http://test.org/pre1"> <goo1 nid="5e9e3a 1.1.17.11.3" xmlns:pre="http://test.org/pre1"></goo1> <goo2 nid="5e9e3d80 1.1.17.11.7" xmlns:gg="http://test.org/schema3" xmlns:pre="http://test.org/pre1"></goo2> </pre:boo3>
12 <pre:boo4 nid="5e9e70 1.1.17.15" xmlns:pre="http://test.org/pre1">
13 <pre:goo3 nid="5e9e7a 1.1.17.15.3" xmlns:pre="http://test.org/pre2"></pre:goo3>
14 </pre:boo4>
15 </pre:foo>
16</plan>
17</document>
180
=== modified file 'test/rbkt/Queries/CMakeLists.txt'
--- test/rbkt/Queries/CMakeLists.txt 2013-04-27 13:42:09 +0000
+++ test/rbkt/Queries/CMakeLists.txt 2013-05-16 09:25:46 +0000
@@ -124,6 +124,12 @@
124 FIND_PACKAGE(CURL)124 FIND_PACKAGE(CURL)
125ENDIF(ZORBA_SUPPRESS_CURL)125ENDIF(ZORBA_SUPPRESS_CURL)
126126
127# Set a flag if testdriver_mt was built
128IF (TARGET testdriver_mt)
129 SET (_testdriver_mt_available 1)
130ELSE (TARGET testdriver_mt)
131 SET (_testdriver_mt_available 0)
132ENDIF (TARGET testdriver_mt)
127133
128FOREACH(TESTFILE ${TESTFILES})134FOREACH(TESTFILE ${TESTFILES})
129 # All testfile paths end in .xq or .xqx. Strip that part off to form135 # All testfile paths end in .xq or .xqx. Strip that part off to form
@@ -161,14 +167,14 @@
161 ENDIF(NOT ZORBA_WITH_JSON)167 ENDIF(NOT ZORBA_WITH_JSON)
162168
163 IF (TESTNAME MATCHES "^test/rbkt/w3c_testsuite")169 IF (TESTNAME MATCHES "^test/rbkt/w3c_testsuite")
164 IF (ZORBATEST_TESTDRIVER_MT_AVAILABLE AND ZORBATEST_USE_MT_XQTS)170 IF (_testdriver_mt_available AND ZORBATEST_USE_MT_XQTS)
165 # If this is an XQTS test and we want to use testdriver_mt instead,171 # If this is an XQTS test and we want to use testdriver_mt instead,
166 # don't add the traditional testdriver version, but remember that172 # don't add the traditional testdriver version, but remember that
167 # we found some173 # we found some
168 SET (SKIP_TEST 1)174 SET (SKIP_TEST 1)
169 ELSE (ZORBATEST_TESTDRIVER_MT_AVAILABLE AND ZORBATEST_USE_MT_XQTS)175 ELSE (_testdriver_mt_available AND ZORBATEST_USE_MT_XQTS)
170 SET (FOUND_XQTS 1)176 SET (FOUND_XQTS 1)
171 ENDIF (ZORBATEST_TESTDRIVER_MT_AVAILABLE AND ZORBATEST_USE_MT_XQTS)177 ENDIF (_testdriver_mt_available AND ZORBATEST_USE_MT_XQTS)
172 ENDIF (TESTNAME MATCHES "^test/rbkt/w3c_testsuite")178 ENDIF (TESTNAME MATCHES "^test/rbkt/w3c_testsuite")
173 IF (ZORBA_NO_FULL_TEXT)179 IF (ZORBA_NO_FULL_TEXT)
174 STRING(REGEX MATCH "fulltext/" NEEDS_FULL_TEXT "${TESTNAME}")180 STRING(REGEX MATCH "fulltext/" NEEDS_FULL_TEXT "${TESTNAME}")
@@ -221,7 +227,7 @@
221227
222ENDFOREACH(TESTFILE)228ENDFOREACH(TESTFILE)
223229
224IF (ZORBATEST_TESTDRIVER_MT_AVAILABLE AND ZORBATEST_USE_MT_XQTS AND230IF (_testdriver_mt_available AND ZORBATEST_USE_MT_XQTS AND
225 IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/w3c_testsuite")231 IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/w3c_testsuite")
226 MESSAGE (STATUS "Adding multi-threaded XQTS test")232 MESSAGE (STATUS "Adding multi-threaded XQTS test")
227 ZORBA_ADD_TEST(xqts-xquery testdriver_mt -q -b w3c_testsuite/XQuery233 ZORBA_ADD_TEST(xqts-xquery testdriver_mt -q -b w3c_testsuite/XQuery
@@ -231,7 +237,7 @@
231 ZORBA_ADD_TEST(xqts-xqx testdriver_mt -q -b w3c_testsuite/XQueryX237 ZORBA_ADD_TEST(xqts-xqx testdriver_mt -q -b w3c_testsuite/XQueryX
232 -k "${CMAKE_CURRENT_SOURCE_DIR}/w3c_known_failures_XQueryX.txt")238 -k "${CMAKE_CURRENT_SOURCE_DIR}/w3c_known_failures_XQueryX.txt")
233 ENDIF (ZORBA_TEST_XQUERYX)239 ENDIF (ZORBA_TEST_XQUERYX)
234ENDIF (ZORBATEST_TESTDRIVER_MT_AVAILABLE AND ZORBATEST_USE_MT_XQTS AND240ENDIF (_testdriver_mt_available AND ZORBATEST_USE_MT_XQTS AND
235 IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/w3c_testsuite")241 IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/w3c_testsuite")
236242
237SET(ZORBA_TEST_W3C_TO_SUBMIT_RESULTS OFF CACHE BOOL "Bool var that says if w3c testing results are to be submitted to w3c, or just for internal testing. If they are for internal testing then we can mark some failing tests as expected results.")243SET(ZORBA_TEST_W3C_TO_SUBMIT_RESULTS OFF CACHE BOOL "Bool var that says if w3c testing results are to be submitted to w3c, or just for internal testing. If they are for internal testing then we can mark some failing tests as expected results.")
238244
=== 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 @@
1# Copyright 2006-2008 The FLWOR Foundation.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14SET(zorbaRepos ${CMAKE_SOURCE_DIR})
15SET(zorbaExecDir ${CMAKE_BINARY_DIR}/test)
16SET(zorbaBuildDir ${CMAKE_BINARY_DIR} )
17SET( zorbaVersion "${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}" )
18
19CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/rbkt.sh.in ${CMAKE_CURRENT_BINARY_DIR}/rbkt.sh @ONLY)
20
21CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/lbkt.sh.in ${CMAKE_CURRENT_BINARY_DIR}/lbkt.sh @ONLY)
22
23CONFIGURE_FILE ( ${CMAKE_CURRENT_SOURCE_DIR}/resultToXml.py.in ${CMAKE_CURRENT_BINARY_DIR}/resultToXml.py @ONLY )
240
=== 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 @@
1#!/bin/sh
2# Copyright 2006-2008 The FLWOR Foundation.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16if test "$#" != "2"; then
17 echo Args: dir1/LastTestsFailed.log[.gz] dir2/LastTestsFailed.log[.gz]
18 exit 1
19fi
20
21TMP1=`mktemp /tmp/XXXXXX`
22
23mycat()
24{
25 if test "`basename $1 .gz`" != "`basename $1`"; then zcat $1; else cat $1; fi
26}
27
28mycat $2 | cut -f2 -d: | sort >$TMP1
29
30mycat $1 | cut -f2 -d: | sort | diff -U0 $TMP1 - | tail -n +3 | egrep -v '^@'
31
32rm -f $TMP1
330
=== 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 @@
1# Copyright 2006-2008 The FLWOR Foundation.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#!/bin/bash
15
16
17################################################################################
18# #
19# rbkt usage #
20# #
21################################################################################
22
23
24function usage ()
25{
26 echo "rbkt.sh [-b bucketName [-q queryName]] [-d displayFormat] [-h]"
27 echo "or"
28 echo "rbkt.sh [-b bucketName1 ... bucketNameN] [-d displayFormat] [-h]"
29 echo
30 echo "Run a single query, or all the queries inside a directory (bucket), or all"
31 echo "the queries in a list of buckets, or all the queries that can be found"
32 echo "anywhere inside the Queries dir."
33 echo
34 echo "Options : "
35 echo
36 echo "-b: Specifies the query bucket to run. <bucketName> is used to construct"
37 echo " the full pathnames for the directories that contain a group of queries,"
38 echo " their expected results, and their actual results. For example, if"
39 echo " bucketName is foo, rbkt will run queries in .../test/rbkt/Queries/foo"
40 echo
41 echo "-q: The query to run. The query string is in file <queryName>.xq inside"
42 echo " the .../test/rbkt/Queries/<bucketName> directory."
43 echo
44 echo "-d: Specifies the display format for the query results. Currently, this"
45 echo " may be one of xml or show. The default is xml"
46 echo
47 echo "-h : help"
48}
49
50
51################################################################################
52# #
53# Test Directories #
54# #
55################################################################################
56
57#
58# Function to check the existence of the required test dirs and to create
59# the results dir.
60#
61function buildDirEnv
62{
63 #echo; echo "buildDirEnv: Checking/Building Environment Directories"
64
65 if [ ! -d ${zorbaRepos} ]; then
66 echo "ERROR 5 buildDirEnv: zorba root directory ${sorbaRepos} does not exist"
67 return 5
68 fi
69
70 if [ ! -d ${testRootDir} ]; then
71 echo "ERROR 10 buildDirEnv: test root directory ${testRootDir} does not exist"
72 return 10
73 fi
74
75 if [ ! -d $scriptsDir ]; then
76 echo "ERROR 14 buildDirEnv: test scripts directory $scriptsDir does not exist"
77 return 14
78 fi
79
80 if [ ! -d ${queriesDir} ]; then
81 echo "ERROR 12 buildDirEnv: queries directory ${queriesDir} does not exist"
82 return 12
83 fi
84 if [ ! -d ${expQueryResultsDir} ]; then
85 echo "ERROR 13 buildDirEnv: expected results directory ${expQueryResultsDir} does not exist"
86 return 13
87 fi
88
89 mkdir -p ${queryResultsDir}
90
91 if [ ! -d ${docsDir} ]; then
92 echo "ERROR 12 buildDirEnv: source docs directory ${docsDir} does not exist"
93 return 12
94 fi
95 if [ ! -d ${expLoaderResultsDir} ]; then
96 echo "ERROR 13 buildDirEnv: expected docs directory ${expLoaderResultsDir} does not exist"
97 return 13
98 fi
99
100 mkdir -p ${loaderResultsDir}
101
102 return 0
103}
104
105
106################################################################################
107# #
108# Running Queries #
109# #
110################################################################################
111
112
113#
114# params:
115#
116# $1 queryFile
117# $2 querySpecFile
118# $3 displayFormat
119#
120function run_query
121{
122 local queryFile="$1"
123 local querySpecFile="$2"
124 local displayFormat=$3
125
126 local error=0
127
128 local EXE=${zorbaExecDir}/apitest
129
130 if [ ! -e "${EXE}" ]; then
131 echo "ERROR 1 run_query: binary executable ${EXE} not found"
132 exit 17
133 fi
134
135 cd ${queryFile%/*}
136
137 #echo "queryFile = ${queryFile}"
138 #echo "querySpecFile = ${querySpecFile}"
139
140 if test -f $querySpecFile; then
141 XARGS=`egrep ^Args: ${querySpecFile} | cut -f2- -d:`
142 ERRS=`egrep ^Error: ${querySpecFile} | cut -f2- -d:`
143 else
144 XARGS=""
145 ERRS=""
146 fi
147
148 #echo "XARGS = ${XARGS}"
149
150 SEDARG=`echo ${testRootDir} | sed -r 's/\//\\\\\//g'`
151
152 echo "s/\$RBKT_SRC_DIR/$SEDARG/g" > sedargs
153
154 XARGS=`echo ${XARGS} | sed -f sedargs`
155
156 rm sedargs
157
158 if [ $displayFormat == "xml" ]; then
159 #echo "${EXE} ${XARGS} -r -o ${queryFile}.res ${queryFile} 2> ${queryFile}.err"
160 ${EXE} ${XARGS} -r -o "${queryFile}.res" "${queryFile}" 2> ${queryFile}.err
161 else
162 ${EXE} -o "${queryFile}.res" "${queryFile}" 2> "${queryFile}.err"
163 fi
164 error=$?
165 if [ ${error} != 0 ]; then
166 echo "ERROR 2 run_query: ${EXE} $1 failed with error code ${error}"
167 # To allow more queries to be run by the caller, do not propagate error
168 fi
169
170 cd - >/dev/null
171
172 return 0
173}
174
175
176#
177# params
178#
179# $1 bucketName
180# $2 queryName
181# $3 displayFormat
182#
183function run_query_in_bucket
184{
185 local bucketName="$1"
186 local queryName="$2"
187 local displayFormat=$3
188
189 local error=0
190
191 local inputDir="${queriesDir}/${bucketName}"
192 local queryFile="${inputDir}/${queryName}.xq"
193 local querySpec="${inputDir}/${queryName}.spec"
194
195 local expResultsDir="${expQueryResultsDir}/${bucketName}"
196 local fmtExt=""
197 if [ $displayFormat == "xml" ]; then
198 fmtExt="xml"
199 else
200 fmtExt="show"
201 fi
202 local expResultFile="${expResultsDir}/${queryName}.${fmtExt}.res"
203
204 local resultsDir="${queryResultsDir}/${bucketName}"
205 local resultFile="${resultsDir}/${queryName}.${fmtExt}.res"
206 local errorsFile="${resultsDir}/${queryName}.${fmtExt}.err"
207 local diffFile="${resultsDir}/${queryName}.${fmtExt}.diff"
208
209 if [ ! -e "${queryFile}" ]; then
210 echo "ERROR 1 run_query_in_bucket: query file ${queryFile} does not exist"
211 return 17
212 fi
213
214 #
215 # Create results directory, if it doesn't exist already.
216 # If it exists, then clean it up.
217 #
218 mkdir -p "${resultsDir}"
219 if [ $? != 0 ]; then echo "ERROR 2 run_query_in_bucket: mkdir -p failed"; exit 19; fi
220 rm -f "${resultDir}"/${queryName}.*
221
222 #
223 # Run the query
224 #
225 run_query "${queryFile}" "${querySpec}" ${displayFormat}
226 error=$?
227 if [ ${error} != 0 ]; then
228 echo "ERROR 3 run_query_in_bucket: run_query failed with error code ${error}"
229 return ${error}
230 fi
231
232 #
233 # apitest creates the result file in the same dir as the query file.
234 # So, we must move the result file to the result dir.
235 #
236 # If no result file was generated, then we create an empty one.
237 #
238 if [ -s "${inputDir}/${queryName}.xq.res.err" ]; then
239 cat "${inputDir}/${queryName}.xq.res.err" | head -1 | cut -f1 -d':' > "${inputDir}/${queryName}.xq.res"
240 fi
241
242 mkdir -p `dirname ${resultFile}`
243 if [ -e "${inputDir}/${queryName}.xq.res" ]; then
244 mv "${inputDir}/${queryName}.xq.res" "${resultFile}"
245 if [ ! -f "${resultFile}" ]; then
246 echo "ERROR 12 run_query_in_bucket: could not create output file"; exit 19;
247 fi
248 else
249 touch "${resultFile}"
250 if [ $? != 0 ]; then
251 echo "ERROR 13 run_query_in_bucket: touch failed"; exit 19;
252 fi
253 fi
254
255 if [ -e "${inputDir}/${queryName}.xq.err" ]; then
256 mv "${inputDir}/${queryName}.xq.err" ${errorsFile}
257 fi
258
259 #
260 # Do the diffs
261 #
262 if [ -e "${expResultFile}" ]; then
263 cat "${expResultFile}" | diff -I '^Duration.*:' "${resultFile}" - > "${diffFile}"
264 #cat "${expResultFile}" | diff -I '^Duration.*:' "${resultFile}" - > "${diffFile}"
265 else
266 echo "Missing expected results for ${queryName}"
267 cp "${queryFile}" "${diffFile}"
268 if [ $? != 0 ]; then echo "ERROR 21 run_query_in_bucket: cp failed"; exit 19; fi
269 fi
270
271 if [ -s "${diffFile}" ]; then
272 echo "FAILURE: ${bucketName} / ${queryName}"
273 echo
274 echo >> rbkt_summary.txt
275 echo "FAILURE : -bucket ${bucketName} -query ${queryName}" >> rbkt_summary.txt
276 echo >> rbkt_summary.txt
277 let failedQueries=failedQueries+1
278 else
279 echo "SUCCESS: ${bucketName} / ${queryName}"
280 echo
281 fi
282
283 let totalQueries=totalQueries+1
284
285 return 0
286}
287
288
289#
290# params:
291#
292# $1 bucketName
293# $2 displayFormat
294#
295function run_bucket()
296{
297 local bucketName="$1"
298 local displayFormat=$2
299 local error=0
300 local queryList=""
301 local q=""
302 local queryName=""
303
304 if [ ! -e "${queriesDir}/${bucketName}" ]; then
305 echo "ERROR 1 run_bucket: bucket ${queriesDir}/${bucketName} does not exist"
306 return 17
307 fi
308
309 queryList=`mktemp`
310 (cd "${queriesDir}/${bucketName}"; find . -name '*.xq' | cut -f2- -d/ ) > $queryList
311
312 # Uses fd 3 for reading queries.
313 # Nasty, but remember there can be many queries, and redirection
314 # applies for the entire while loop.
315 while read -u3 q; do
316 queryName=`echo $q | sed -e 's/.xq$//g'`
317 run_query_in_bucket "${bucketName}" "${queryName}" ${displayFormat}
318 error=$?
319 if [ ${error} != 0 ]; then
320 echo "ERROR 3 run_bucket: run_bucket failed with error code ${error}"
321 return ${error}
322 fi
323 done 3< $queryList
324
325 rm -f $queryList
326
327 return 0
328}
329
330
331################################################################################
332# #
333# Loading Docs #
334# #
335################################################################################
336
337
338#
339# $1 - docFile : Full pathname of the file that contains the document text
340#
341function load_doc
342{
343 local error=0
344
345 local docFile="$1"
346
347 local EXE=${zorbaExecDir}/test_store
348
349 if [ ! -e "${EXE}" ]; then
350 echo "ERROR 1 load_doc: binary executable ${EXE} not found"
351 exit 17
352 fi
353
354 ${EXE} "${docFile}"
355 error=$?
356 if [ ${error} != 0 ]; then
357 echo "ERROR 2 load_doc: ${EXE} $1 failed with error code ${error}"
358 # To allow more docs to be loaded by the caller, do not propagate error
359 fi
360
361 return 0
362}
363
364
365#
366# $1 bucketName : See load_bucket() function
367# $2 docName : The doc name.
368#
369function load_doc_in_bucket()
370{
371 local error=0
372
373 local bucketName="$1"
374 local docName="$2"
375
376 local inputDir="${docsDir}/${bucketName}"
377 local docFile="${inputDir}/${docName}.xml"
378
379 local expResultsDir="${expLoaderResultsDir}/${bucketName}"
380 local expResultFile="${expResultsDir}/${docName}.xml"
381
382 local resultsDir="${loaderResultsDir}/${bucketName}"
383 local resultFile="${resultsDir}/${docName}.xml"
384 local diffFile="${resultsDir}/${docName}.diff"
385
386 if [ ! -e "${docFile}" ]; then
387 echo "ERROR 1 load_doc_in_bucket: doc file ${docFile} does not exist"
388 return 17
389 fi
390
391 #
392 # Create results directory, if it doesn't exist already.
393 # If it exists, then clean it up.
394 #
395 mkdir -p "${resultsDir}"
396 if [ $? != 0 ]; then echo "ERROR 2 load_doc_in_bucket: mkdir -p failed"; exit 19; fi
397 rm -f "${resultsDir}"/${docName}.*
398
399 #
400 # Load the doc
401 #
402 load_doc "${docFile}"
403 error=$?
404 if [ ${error} != 0 ]; then
405 echo "ERROR 3 load_doc_in_bucket: load_doc failed with error code ${error}"
406 return ${error}
407 fi
408
409 #
410 # test_store creates the result file in the same dir as the doc file.
411 # So, we must move the result file to the result dir.
412 #
413 # If no result file was generated, then we create an empty one.
414 #
415 if [ -e "${inputDir}/${docName}.xml.res" ]; then
416 mv "${inputDir}/${docName}.xml.res" "${resultFile}"
417 if [ $? != 0 ]; then echo "ERROR 12 load_doc_in_bucket: mv failed"; exit 19; fi
418 else
419 touch "${resultFile}"
420 if [ $? != 0 ]; then echo "ERROR 13 load_doc_in_bucket: touch failed"; exit 19; fi
421 fi
422
423 #
424 # Do the diffs
425 #
426 if [ -e "${expResultFile}" ]; then
427 diff "${resultFile}" "${expResultFile}" > "${diffFile}"
428 else
429 echo "Missing expected results for ${docName}"
430 cp "${docFile}" "${diffFile}"
431 if [ $? != 0 ]; then echo "ERROR 21 load_doc_in_bucket: cp failed"; exit 19; fi
432 fi
433
434 if [ -s "${diffFile}" ]; then
435 echo
436 echo "FAILURE : -bucket ${bucketName} -doc ${docName}"
437 echo
438 let failedDocs=failedDocs+1
439 else
440 echo
441 echo "SUCCESS : -bucket ${bucketName} -doc ${docName}"
442 echo
443 fi
444
445 let totalDocs=totalDocs+1
446
447 return 0
448}
449
450
451#
452# params:
453#
454# $1 bucketName
455#
456function load_bucket()
457{
458 local error=0
459 local docList=""
460 local d=""
461 local docName=""
462 local bucketName="$1"
463
464 if [ ! -e "${docsDir}/${bucketName}" ]; then
465 echo "ERROR 1 load_bucket: bucket ${docsDir}/${bucketName} does not exist"
466 return 17
467 fi
468
469 cd "${docsDir}/${bucketName}"
470 docList=`ls *.xml`
471 cd - >/dev/null
472
473 for d in $docList
474 do
475 echo ${d} | sed -e s/".xml"/""/g > tmp_docFile
476 for docName in `cat tmp_docFile`
477 do
478 load_doc_in_bucket "${bucketName}" "${docName}"
479 error=$?
480 if [ ${error} != 0 ]; then
481 echo "ERROR 3 load_bucket: load_bucket failed with error code ${error}"
482 return ${error}
483 fi
484 done
485 rm -f tmp_docFile
486 done
487
488 return 0
489}
4900
=== 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 @@
1#!/bin/bash
2# Copyright 2006-2008 The FLWOR Foundation.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16zorbaRepos=@zorbaRepos@
17zorbaExecDir=@zorbaExecDir@
18
19error=0
20
21#
22# The environment variable zorbaRepos must be defined. It should point to a
23# directory containing a zorba source repository (e.g., /home/markos/zorba/xquery)
24#
25if [ ! ${zorbaRepos} ]; then
26 echo "ERROR 1 lbkt.sh: zorbaRepos environment variable is not set"
27 exit 1
28fi
29
30
31#
32# The environment variable zorbaExeDir must be defined. It must be set to the
33# full pathname of the directory containig all the test executables
34#
35if [ ! ${zorbaExecDir} ]; then
36 echo "ERROR 1 lbkt.sh: zorbaExecDir environment variable is not set"
37 exit 1
38fi
39
40#
41# testRootDir is the root directory of the test environment. It contains the
42# the scripts, the test queries and their expected results, and the source docs
43# to be loaded. It is also under this directory where all output from the tests
44# is stored.
45#
46testRootDir=${zorbaRepos}/test/rbkt
47
48# The following dirs MUST exist under the testRootDir.
49scriptsDir=${testRootDir}/Scripts
50queriesDir=${testRootDir}/Queries
51expQueryResultsDir=${testRootDir}/ExpQueryResults
52docsDir=${testRootDir}/Documents
53expLoaderResultsDir=${testRootDir}/ExpLoaderResults
54
55# This is the dir where all query results are stored. This dir is created
56# by the buildDirEnv function, if it does not exist already.
57queryResultsDir=${testRootDir}/QueryResults
58
59# This is the dir where all loader results are stored. This dir is created
60# by the buildDirEnv function, if it does not exist already.
61loaderResultsDir=${testRootDir}/LoaderResults
62
63
64#
65# sourcing of common functions
66#
67if [ ! -e ${scriptsDir}/functions.sh ]; then
68 echo "ERROR 3 lbkt.sh: ${scriptsDir}/functions.sh does not exist"
69 exit 3
70fi
71
72source ${scriptsDir}/functions.sh
73
74trap '' 12
75
76#
77# Argument parsing
78#
79bucketName=""
80docName=""
81
82state=0
83while [ $1 ]
84do
85 case $1 in
86 -b) state=1;;
87 -d) state=2;;
88 -h) usage ; exit;;
89 *) case $state in
90 1) bucketName="$1"; state=0 ;;
91 2) docName="$1"; state=0 ;;
92 *) echo "ERROR 6 lbkt.sh: Wrong parameter $1"; usage; exit 6;;
93 esac ;;
94 esac
95 shift
96done
97
98if [ $state -ne 0 ]; then
99 echo "ERROR 7 lbkt.sh: Wrong arg list"; usage; exit 7;
100fi
101
102
103#
104# Building env directories and runtime env
105#
106buildDirEnv
107error=$?
108if [ ${error} -ne 0 ]; then
109 echo "ERROR 10 lbkt.sh: buildDirEnv function failed with error code ${error}"
110 exit ${error}
111fi
112
113
114#
115# Load queries
116#
117#echo; echo "Loading Queries"
118failedDocs=0
119totalDocss=0
120
121rm -f lbkt_summary.txt
122
123if [ "${bucketName}" != "" ]; then
124
125 if [ "${docName}" != "" ]; then
126 load_doc_in_bucket "${bucketName}" "${docName}"
127 error=$?
128 if [ ${error} -ne 0 ]; then
129 echo "ERROR 70 lbkt.sh: load_doc_in_bucket function failed with error code ${error}"
130 exit ${error}
131 fi
132 else
133 echo; echo "Loading bucket ${bucketName}"
134 load_bucket "${bucketName}"
135 error=$?
136 if [ ${error} -ne 0 ]; then
137 echo "ERROR 71 lbkt.sh: run_bucket function failed with error code ${error}"
138 exit ${error}
139 fi
140 fi
141
142else
143 #bucketList=`find "${queriesSDir}" -mindepth 1 -type d -printf "%f\n"`
144 bucketList="test"
145
146 for bucketName in ${bucketList}
147 do
148 echo; echo "Running bucket ${bucketName}"
149 load_bucket "${bucketName}"
150 error=$?
151 if [ ${error} -ne 0 ]; then
152 echo "ERROR 72 lbkt.sh: run_bucket function failed with error code ${error}"
153 exit ${error}
154 fi
155 done
156fi
157
158echo
159echo "lbkt.sh : total number of docs = $totalDocs"
160echo "lbkt.sh : number of failed docs = $failedDocs"
161
162echo >> lbkt_summary.txt
163echo "lbkt.sh : total number of docs = $totalDocs" >> lbkt_summary.txt
164echo "lbkt.sh : number of failed docs = $failedDocs" >> lbkt_summary.txt
165
166if [ ${failedDocs} -gt 0 ]; then
167 exit 1
168else
169 exit 0
170fi
1710
=== 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 @@
1#!/bin/bash
2# Copyright 2006-2008 The FLWOR Foundation.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16error=0
17
18zorbaRepos=@zorbaRepos@
19zorbaExecDir=@zorbaExecDir@
20
21#
22# The environment variable zorbaRepos must be defined. It should point to a
23# directory containing a zorba source repository (e.g., /home/markos/zorba/xquery)
24#
25if [ ! ${zorbaRepos} ]; then
26 echo "ERROR 1 rbkt.sh: zorbaRepos environment variable is not set"
27 exit 1
28fi
29
30
31#
32# The environment variable zorbaExe must be defined. It must be set to the
33# full pathname of the query_exec executable
34#
35if [ ! ${zorbaExecDir} ]; then
36 echo "ERROR 1 rbkt.sh: zorbaExecDir environment variable is not set"
37 exit 1
38fi
39
40#
41# testRootDir is the root directory of the test environment. It contains the
42# the scripts, the test queries and their expected results. It is also under
43# this directory where all output from the tests is stored.
44#
45testRootDir="${zorbaRepos}/test/rbkt"
46
47# The following dirs MUST exist under the testRootDir.
48scriptsDir=${testRootDir}/Scripts
49
50queriesDir=${testRootDir}/Queries
51expQueryResultsDir=${testRootDir}/ExpQueryResults
52docsDir=${testRootDir}/Documents
53expLoaderResultsDir=${testRootDir}/ExpLoaderResults
54
55# This is the dir where all query results are stored. This dir is created
56# by the buildDirEnv function, if it does not exist already.
57queryResultsDir=${testRootDir}/QueryResults
58
59# This is the dir where all loader results are stored. This dir is created
60# by the buildDirEnv function, if it does not exist already.
61loaderResultsDir=${testRootDir}/LoaderResults
62
63
64#
65# sourcing of common functions
66#
67if [ ! -e ${scriptsDir}/functions.sh ]; then
68 echo "ERROR 3 rbkt.sh: ${scriptsDir}/functions.sh does not exist"
69 exit 3
70fi
71
72source ${scriptsDir}/functions.sh
73
74trap '' 12
75
76#
77# Argument parsing
78#
79bucketList=""
80bucketName=""
81numBuckets=0
82queryName=""
83displayFormat="xml"
84
85state=0
86while [ $1 ]
87do
88 case $1 in
89 -b) state=1;;
90
91 -q) if [ $state -eq 0 -o $state -eq 1 -a $numBuckets -eq 1 ]; then
92 state=2;
93 else
94 echo "ERROR 5 rbkt.sh: Wrong option -q"; usage; exit 5;
95 fi ;;
96
97 -d) state=3;;
98
99 -h) usage ; exit;;
100
101 *) case $state in
102
103 1) if [ $numBuckets -eq 0 ]; then
104 bucketList="$1"
105 else
106 bucketList="${bucketList} $1";
107 fi
108 let numBuckets=$numBuckets+1 ;;
109
110 2) queryName="$1"; state=0 ;;
111
112 3) displayFormat="$1"; state=0 ;;
113
114 *) echo "ERROR 6 rbkt.sh: Wrong parameter $1"; usage; exit 6;;
115 esac ;;
116 esac
117 shift
118done
119
120if [ $numBuckets -eq 1 ]; then
121 bucketName=$bucketList
122fi
123
124if [ $state -ne 0 -a $state -ne 1 ]; then
125 echo "ERROR 7 rbkt.sh: Wrong arg list"; usage; exit 7;
126fi
127
128if [ ${displayFormat} != "xml" -a ${displayFormat} != "show" ]; then
129 echo "ERROR 8 rbkt.sh: Wrong display format; must be xml or show"; exit 8;
130fi
131
132#
133# Building env directories and runtime env
134#
135buildDirEnv
136error=$?
137if [ ${error} -ne 0 ]; then
138 echo "ERROR 10 rbkt.sh: buildDirEnv function failed with error code ${error}"
139 exit ${error}
140fi
141
142
143#
144# Run queries
145#
146#echo; echo "Running Queries"
147failedQueries=0
148totalQueries=0
149
150rm -f rbkt_summary.txt
151
152if [ "${bucketName}" != "" ]; then
153
154 if [ "${queryName}" != "" ]; then
155 run_query_in_bucket "${bucketName}" "${queryName}" ${displayFormat}
156 error=$?
157 if [ ${error} -ne 0 ]; then
158 echo "ERROR 70 rbkt.sh: run_query_in_bucket function failed with error code ${error}"
159 exit ${error}
160 fi
161 else
162 echo; echo "Running bucket ${bucketName}"
163 run_bucket "${bucketName}" ${displayFormat}
164 error=$?
165 if [ ${error} -ne 0 ]; then
166 echo "ERROR 71 rbkt.sh: run_bucket function failed with error code ${error}"
167 exit ${error}
168 fi
169 fi
170
171else
172 if [ -z "${bucketList}" ]; then
173 # bugfix by Matthias (collect the buckets automatically)
174 bucketList=`find "${queriesDir}" -type d -maxdepth 1 ! -name '.svn' ! -name '.' ! -name 'Queries' -exec basename {} \;`
175 fi
176
177 echo "bucketList = $bucketList"
178
179 for bucketName in ${bucketList}
180 do
181 echo; echo "Running bucket ${bucketName}"
182 run_bucket "${bucketName}" ${displayFormat}
183 error=$?
184 if [ ${error} -ne 0 ]; then
185 echo "ERROR 72 rbkt.sh: run_bucket function failed with error code ${error}"
186 exit ${error}
187 fi
188 done
189fi
190
191echo
192echo "rbkt.sh : total number of queries = $totalQueries"
193echo "rbkt.sh : number of failed queries = $failedQueries"
194
195echo >> rbkt_summary.txt
196echo "rbkt.sh : number of failed queries = $failedQueries" >> rbkt_summary.txt
197
198rm -f query.dot
199rm -f query.xml
200
201if [ ${failedQueries} -gt 0 ]; then
202 exit 1
203else
204 exit 0
205fi
2060
=== 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 @@
1#!/usr/bin/python
2
3""" Copyright 2009 The FLWOR Foundation.
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License."""
16
17import string
18import sys
19
20ctest_failed_file = "@zorbaBuildDir@/Testing/Temporary/LastTestsFailed.log"
21ctest_log_file = "@zorbaBuildDir@/Testing/Temporary/LastTest.log"
22
23out_file = "@zorbaBuildDir@/result.xml"
24
25out = open ( out_file, 'w' )
26
27out.write ( '<?xml version="1.0" encoding="UTF-8"?>\n' )
28out.write ( '<test-suite-result\n' )
29out.write ( " xmlns='http://www.w3.org/2005/02/query-test-XQTSResult'\n" )
30out.write ( ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n' )
31out.write ( ' <implementation\n' )
32out.write ( ' name="Zorba"\n' )
33out.write ( ' version="@zorbaVersion@">\n' )
34out.write ( ' <organization\n' )
35out.write ( ' name="FLWOR Foundation"\n' )
36out.write ( ' website="http://www.zobra-xquery.com />"\n' )
37out.write ( ' <subittor\n' )
38out.write ( ' name="Timh Kraska"\n' )
39out.write ( ' email="tim.kraska@inf.ethz.ch" />\n' )
40out.write ( ' <description>\n' )
41out.write ( ' <p>Zorba is a XQuery processor writtenin C++ available under the Apache License.</p>\n' )
42out.write ( ' </description>\n' )
43
44
45def has_testing ( s ):
46 yes = string.find ( s, 'Testing:' )
47 yes2 = s.find ( 'w3c_testsuite' )
48 return yes > 0 and yes2 > 0
49
50def get_test_name ( s ) :
51 words = string.split ( s, '/' )
52 l = len ( words )
53 name = words[ l -1]
54 name = string.strip ( name )
55 return name
56
57try:
58 failedfile = open ( ctest_failed_file, 'r' )
59 failed = True
60except IOError :
61 print "CTest failed log not found"
62 print "Assuming that CTest was run and that there were no failures"
63 failed = False
64
65failures = set()
66if failed :
67 for line in failedfile:
68 i = string.find ( line, "w3c_testsuite" )
69 if i > 0 :
70 name = get_test_name ( line )
71 failures.add ( name )
72
73try:
74 file = open ( ctest_log_file, 'r' )
75except IOError :
76 print "Ctest log file not found"
77 print "Run CTest before this script"
78 sys.exit ( 1 )
79
80for line in file:
81 if has_testing ( line ):
82 name = get_test_name ( line )
83 if name in failures :
84 out.write ( '<test-case name="%s" result="failed" />\n' % name )
85 else :
86 out.write ( '<test-case name="%s" result="passed" />\n' % name )
87
88out.write ( '</test-suite-result>' )
890
=== 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 @@
1# Copyright 2006-2008 The FLWOR Foundation.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#!/bin/bash
15perl -pe 's#<([^> ]+)([^>]*?)/ *>#<$1 $2></$1>#g;s/^<\?xml[^>]*\?>//g' | (echo '<root>'; cat; echo '</root>') | tidy -q -xml -indent 2>/dev/null
160
=== 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 @@
1#!/bin/bash
2
3# This shell script checks out a fresh XQFTTS from W3C and creates a new XQFTTS_current.zip
4# W3C provides an ANT script for all their tesuites (XQTS, XQUTS, XQFTTS)
5
6xqfttsDir=XQFTTS/2007/xpath-full-text-10-test-suite
7
8export CVSROOT=":pserver:anonymous@dev.w3.org:/sources/public"
9cvs login
10
11#echo: checking out the Full test test suite (XQFTTS)
12#cd $xqfttsDir/../
13#cvs get2007/xpath-full-text-10-test-suite xpath-full-text-10-test-suite
14
15echo get updates (the password is anonymous)
16cd $xqfttsDir
17cvs update
18
19echo create new XQFTTS_development.zip archive
20echo NOTE: Ant (the build generator for Java) is a requirement for this
21cd $xqfttsDir/Tools/ZipXQTS
22ant -buildfile Build.xml
23
24echo copy the new XQFTTS_development.zip archive to /tmp/XQFTTS_current.zip
25echo Note: the name of the .ZIP in /tmp folder has to match the name in the import_w3c_full_text_testsuite.sh
26echo for the ZIP variable at line 58
27cp $xqfttsDir/PublicPagesStagingArea/XQFTTS_development.zip /tmp/XQFTTS_current.zip
28
29echo now, if you comment the lines that download the .ZIP from W3C (lines 59 and 60)
30echo and run the import_w3c_full_text_testsuite.sh you are all set !
31\ No newline at end of file0\ No newline at end of file
321
=== modified file 'test/sax2/CMakeLists.txt'
--- test/sax2/CMakeLists.txt 2013-02-26 04:12:43 +0000
+++ test/sax2/CMakeLists.txt 2013-05-16 09:25:46 +0000
@@ -12,19 +12,6 @@
12# See the License for the specific language governing permissions and12# See the License for the specific language governing permissions and
13# limitations under the License.13# limitations under the License.
1414
15# configure the testdriver
16CONFIGURE_FILE(sax2testdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/sax2testdriverconfig.h)
17
18# Compile and build the testdriver executable
19INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
20INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/test/commons)
21
22SET (SAX2_TESTDRIVER_SRCS
23 sax2testdriver.cpp
24 ${CMAKE_SOURCE_DIR}/test/commons/testdriver_comparator.cpp
25 )
26
27ZORBA_GENERATE_EXE(sax2testdriver "${SAX2_TESTDRIVER_SRCS}" "" "" "")
2815
29# Compute results directory for testdriver16# Compute results directory for testdriver
30SET (_results_dir "${CMAKE_CURRENT_BINARY_DIR}/QueryResults")17SET (_results_dir "${CMAKE_CURRENT_BINARY_DIR}/QueryResults")
3118
=== 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 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef XQP_SAX2_TESTDRIVER_CONFIG_H
18#define XQP_SAX2_TESTDRIVER_CONFIG_H
19
20namespace zorba {
21
22static std::string SAX2_SRC_DIR = "@CMAKE_CURRENT_SOURCE_DIR@";
23static std::string SAX2_BINARY_DIR = "@CMAKE_CURRENT_BINARY_DIR@";
24
25}
26#endif
270
=== 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 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16/**
17 * Class to measure execution time based on CPU clocks and system time.
18 * made by Dongseop Kwon (subby@db.snu.ac.kr), 23/07/2003
19 */
20
21
22#ifndef ZORBA_TIMER_H
23#define ZORBA_TIMER_H
24
25#include <ctime>
26#ifndef WIN32
27#include <sys/time.h>
28#else
29#include <time.h>
30#endif
31
32#include <iostream>
33
34
35class Timer
36{
37 clock_t startClock;
38 clock_t suspendClock;
39 clock_t endClock;
40
41#ifndef WIN32
42 double startTime;
43 double endTime;
44 double suspendTime;
45#endif
46
47 bool suspended;
48 bool running;
49 bool verbose;
50
51public:
52 // timer routines
53 void start();
54 void end();
55 void suspend();
56 void resume();
57
58 double getClock();
59 double getTime();
60
61 // print all information
62 std::ostream& print(std::ostream& os);
63 bool isRunning();
64
65 Timer(bool start = true, bool verbose = false);
66};
67#endif
68
69/*
70 * Local variables:
71 * mode: c++
72 * End:
73 */
740
=== modified file 'test/unit/CMakeLists.txt'
--- test/unit/CMakeLists.txt 2013-05-14 09:59:59 +0000
+++ test/unit/CMakeLists.txt 2013-05-16 09:25:46 +0000
@@ -119,6 +119,7 @@
119)119)
120120
121# add the executable121# add the executable
122INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}/test/driver")
122ZORBA_GENERATE_EXE(UnitTests "${UnitTests}" "" "" "")123ZORBA_GENERATE_EXE(UnitTests "${UnitTests}" "" "" "")
123124
124# remove the test driver source file125# remove the test driver source file
125126
=== 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 09:25:46 +0000
@@ -29,7 +29,7 @@
29#include <zorba/xquery_exception.h>29#include <zorba/xquery_exception.h>
3030
3131
32#include "rbkt/testdriverconfig.h"32#include <testdriverconfig.h>
3333
34using namespace zorba;34using namespace zorba;
3535
3636
=== modified file 'test/update/CMakeLists.txt'
--- test/update/CMakeLists.txt 2013-02-26 04:12:43 +0000
+++ test/update/CMakeLists.txt 2013-05-16 09:25:46 +0000
@@ -12,22 +12,6 @@
12# See the License for the specific language governing permissions and12# See the License for the specific language governing permissions and
13# limitations under the License.13# limitations under the License.
1414
15# configure the testdriver
16CONFIGURE_FILE(testdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/testdriverconfig.h)
17
18# Compile and build the testdriver executable
19INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
20INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/test/commons)
21
22SET(UPDTESTDRIVER_SRCS
23 updtestdriver.cpp
24 ${CMAKE_SOURCE_DIR}/test/commons/testdriver_comparator.cpp
25 ${CMAKE_SOURCE_DIR}/test/commons/testuriresolver.cpp)
26
27INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
28
29INCLUDE(${CMAKE_SOURCE_DIR}/cmake_modules/ZorbaGenerateExe.cmake)
30ZORBA_GENERATE_EXE("updtestdriver" "${UPDTESTDRIVER_SRCS}" "" "" "")
3115
32# collect all spec files (suffix .spec) in all subdirectories of the Queries dir16# collect all spec files (suffix .spec) in all subdirectories of the Queries dir
33FILE(GLOB_RECURSE TESTFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/Queries/ FOLLOW_SYMLINKS "*.spec")17FILE(GLOB_RECURSE TESTFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/Queries/ FOLLOW_SYMLINKS "*.spec")
3418
=== 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 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef XQP_UPDATE_TESTDRIVER_CONFIG_H
17#define XQP_UPDATE_TESTDRIVER_CONFIG_H
18
19namespace zorba {
20
21#cmakedefine ZORBA_TEST_PLAN_SERIALIZATION
22
23static std::string UPDATE_SRC_DIR = "@CMAKE_CURRENT_SOURCE_DIR@";
24static std::string UPDATE_BINARY_DIR = "@CMAKE_CURRENT_BINARY_DIR@";
25
26}
27#endif

Subscribers

People subscribed via source and target branches