Merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba

Proposed by Markos Zaharioudakis
Status: Merged
Approved by: Markos Zaharioudakis
Approved revision: 11122
Merged at revision: 11477
Proposed branch: lp:~zorba-coders/zorba/markos-scratch
Merge into: lp:zorba
Diff against target: 218 lines (+54/-12)
4 files modified
src/compiler/expression/expr_type.cpp (+20/-4)
test/fots/CMakeLists.txt (+0/-2)
test/rbkt/Queries/w3c_known_failures.txt (+17/-6)
test/rbkt/Queries/w3c_known_failures_XQueryX.txt (+17/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/markos-scratch
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Approve
Review via email: mp+166132@code.launchpad.net

Commit message

disabled throwing of error XPST0005 for path exprs (also fixes bug #1090514)

Description of the change

disabled throwing of error XPST0005 for path exprs (also fixes bug #1090514)

To post a comment you must log in.
Revision history for this message
Markos Zaharioudakis (markos-za) :
review: Approve
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/markos-scratch into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:281 (message):
  Validation queue job markos-scratch-2013-05-28T23-35-52.117Z is finished.
  The final status was:

  2 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

11121. By Markos Zaharioudakis

added expected xqts failures

11122. By Markos Zaharioudakis

added expected xqts failures

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 markos-scratch-2013-05-29T00-36-43.132Z 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
1=== modified file 'src/compiler/expression/expr_type.cpp'
2--- src/compiler/expression/expr_type.cpp 2013-05-24 16:34:11 +0000
3+++ src/compiler/expression/expr_type.cpp 2013-05-29 00:10:32 +0000
4@@ -42,6 +42,8 @@
5 #include "types/root_typemanager.h"
6 #include "types/typeops.h"
7
8+//#define THROW_XPST0005
9+
10 namespace zorba
11 {
12
13@@ -842,20 +844,16 @@
14 RootTypeManager& RTM = GENV_TYPESYSTEM;
15 TypeManager* tm = sctx->get_typemanager();
16
17- const QueryLoc& loc = axisStep->get_loc();
18-
19 axis_kind_t axisKind = axisStep->getAxis();
20 match_expr* nodeTest = axisStep->getTest();
21
22 match_test_t testKind = nodeTest->getTestKind();
23 store::StoreConsts::NodeKind testNodeKind = nodeTest->getNodeKind();
24- store::Item* testSchemaType = nodeTest->getTypeName();
25 store::Item* testNodeName = nodeTest->getQName();
26 match_wild_t wildKind = nodeTest->getWildKind();
27
28 TypeConstants::quantifier_t inQuant = inputType->get_quantifier();
29 store::StoreConsts::NodeKind inNodeKind = inputType->get_node_kind();
30- store::Item* inNodeName = inputType->get_node_name();
31 xqtref_t inContentType = inputType->get_content_type();
32
33 TypeConstants::quantifier_t star = TypeConstants::QUANT_STAR;
34@@ -877,6 +875,11 @@
35 }
36 }
37
38+#ifdef THROW_XPST0005
39+ const QueryLoc& loc = axisStep->get_loc();
40+ store::Item* testSchemaType = nodeTest->getTypeName();
41+ store::Item* inNodeName = inputType->get_node_name();
42+
43 if (inUntyped &&
44 (axisKind == axis_kind_self ||
45 axisKind == axis_kind_descendant_or_self ||
46@@ -897,11 +900,13 @@
47 throw XQUERY_EXCEPTION(err::XPST0005, ERROR_LOC(loc));
48 }
49 }
50+#endif
51
52 switch (axisKind)
53 {
54 case axis_kind_parent:
55 {
56+#ifdef THROW_XPST0005
57 // Doc nodes do not have parent
58 if (inNodeKind == store::StoreConsts::documentNode)
59 {
60@@ -922,6 +927,7 @@
61 {
62 throw XQUERY_EXCEPTION(err::XPST0005, ERROR_LOC(loc));
63 }
64+#endif
65
66 return create_axis_step_type(tm, testNodeKind, testNodeName, inQuant, false);
67
68@@ -930,6 +936,7 @@
69
70 case axis_kind_ancestor:
71 {
72+#ifdef THROW_XPST0005
73 // Doc nodes do not have ancestors
74 if (inNodeKind == store::StoreConsts::documentNode)
75 {
76@@ -943,6 +950,7 @@
77 {
78 throw XQUERY_EXCEPTION(err::XPST0005, ERROR_LOC(loc));
79 }
80+#endif
81
82 if (testNodeKind == store::StoreConsts::elementNode)
83 {
84@@ -988,6 +996,7 @@
85 case axis_kind_self:
86 {
87 self:
88+#ifdef THROW_XPST0005
89 // The node kind of the self node must be compatible with the NodeTest.
90 if (testNodeKind != store::StoreConsts::anyNode &&
91 inNodeKind != store::StoreConsts::anyNode &&
92@@ -1003,6 +1012,7 @@
93 {
94 throw XQUERY_EXCEPTION(err::XPST0005, ERROR_LOC(loc));
95 }
96+#endif
97
98 switch (inNodeKind)
99 {
100@@ -1095,6 +1105,7 @@
101 case axis_kind_descendant:
102 case axis_kind_child:
103 {
104+#ifdef THROW_XPST0005
105 if (inNodeKind == store::StoreConsts::attributeNode ||
106 inNodeKind == store::StoreConsts::textNode ||
107 inNodeKind == store::StoreConsts::piNode ||
108@@ -1108,6 +1119,7 @@
109 {
110 throw XQUERY_EXCEPTION(err::XPST0005, ERROR_LOC(loc));
111 }
112+#endif
113
114 switch (testNodeKind)
115 {
116@@ -1135,6 +1147,7 @@
117
118 case axis_kind_attribute:
119 {
120+#ifdef THROW_XPST0005
121 // only element nodes have attributes.
122 if (inNodeKind != store::StoreConsts::elementNode &&
123 inNodeKind != store::StoreConsts::anyNode)
124@@ -1150,6 +1163,7 @@
125 {
126 throw XQUERY_EXCEPTION(err::XPST0005, ERROR_LOC(loc));
127 }
128+#endif
129
130 if ((testKind == match_name_test && wildKind == match_no_wild) ||
131 testKind == match_xs_attr_test)
132@@ -1177,11 +1191,13 @@
133 case axis_kind_following:
134 case axis_kind_preceding:
135 {
136+#ifdef THROW_XPST0005
137 if (inNodeKind == store::StoreConsts::documentNode ||
138 testNodeKind == store::StoreConsts::documentNode)
139 {
140 throw XQUERY_EXCEPTION(err::XPST0005, ERROR_LOC(loc));
141 }
142+#endif
143
144 if ((axisKind == axis_kind_following_sibling ||
145 axisKind == axis_kind_preceding_sibling) &&
146
147=== modified file 'test/fots/CMakeLists.txt'
148--- test/fots/CMakeLists.txt 2013-05-27 08:39:12 +0000
149+++ test/fots/CMakeLists.txt 2013-05-29 00:10:32 +0000
150@@ -184,8 +184,6 @@
151 EXPECTED_FOTS_FAILURE (fn-format-number numberformat83 1167643)
152 EXPECTED_FOTS_FAILURE (fn-format-number numberformat87 1167641)
153 EXPECTED_FOTS_FAILURE (fn-format-number numberformat88 1167641)
154-EXPECTED_FOTS_FAILURE (fn-generate-id generate-id-015 1090514)
155-EXPECTED_FOTS_FAILURE (fn-generate-id generate-id-017 1090514)
156 EXPECTED_FOTS_FAILURE (fn-matches cbcl-matches-038 1131304)
157 EXPECTED_FOTS_FAILURE (fn-normalize-space fn-normalize-space-23 0)
158 EXPECTED_FOTS_FAILURE (fn-normalize-space fn-normalize-space-25 0)
159
160=== modified file 'test/rbkt/Queries/w3c_known_failures.txt'
161--- test/rbkt/Queries/w3c_known_failures.txt 2013-05-15 18:45:14 +0000
162+++ test/rbkt/Queries/w3c_known_failures.txt 2013-05-29 00:10:32 +0000
163@@ -32,13 +32,24 @@
164 test/rbkt/w3c_testsuite/XQuery/exprSeqTypes/PrologExpr/VariableProlog/ExternalVariablesWith/K2-ExternalVariablesWith-22
165 test/rbkt/w3c_testsuite/XQuery/exprSeqTypes/SeqExprCast/K2-SeqExprCast-231
166 test/rbkt/w3c_testsuite/XQuery/exprSeqTypes/SeqExprCast/K2-SeqExprCast-232
167-test/rbkt/w3c_testsuite/XQuery/SchemaImport/UserDefinedSI/user-defined-2
168 test/rbkt/w3c_testsuite/XQuery/StaticTyping/STFLWORExpr/ST-PITest-02
169 test/rbkt/w3c_testsuite/XQuery/StaticTyping/STFLWORExpr/ST-WhereExpr001
170 test/rbkt/w3c_testsuite/XQuery/StaticTyping/STFLWORExpr/ST-PITest-01
171 test/rbkt/w3c_testsuite/XQuery/StaticTyping/STFunctions/ST-Data001
172-test/rbkt/zorba/jsoniq/comment_01.jq
173-test/rbkt/zorba/jsoniq/comment_02.jq
174-test/rbkt/zorba/jsoniq/comment_03.jq
175-test/rbkt/zorba/jsoniq/comment_04.jq
176-test/rbkt/zorba/jsoniq/comment_05.jq
177+test/rbkt/w3c_testsuite/XQuery/PathExpr/Steps/Axes/K2-Axes-86
178+test/rbkt/w3c_testsuite/XQuery/PathExpr/Steps/Axes/K2-Axes-52
179+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes001
180+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes006
181+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes008
182+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes011
183+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes005
184+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes002
185+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes015
186+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes007
187+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes012
188+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes009
189+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes003
190+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes010
191+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes014
192+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes004
193+test/rbkt/w3c_testsuite/XQuery/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes013
194
195=== modified file 'test/rbkt/Queries/w3c_known_failures_XQueryX.txt'
196--- test/rbkt/Queries/w3c_known_failures_XQueryX.txt 2013-05-15 18:00:51 +0000
197+++ test/rbkt/Queries/w3c_known_failures_XQueryX.txt 2013-05-29 00:10:32 +0000
198@@ -41,3 +41,20 @@
199 test/rbkt/w3c_testsuite/XQueryX/FunctX/functx-fn-tokenize/functx-fn-tokenize-all
200 test/rbkt/w3c_testsuite/XQueryX/Basics/EQNames/eqname-013
201 test/rbkt/w3c_testsuite/XQueryX/SchemaImport/UserDefinedSI/user-defined-2
202+test/rbkt/w3c_testsuite/XQueryX/PathExpr/Steps/Axes/K2-Axes-86
203+test/rbkt/w3c_testsuite/XQueryX/PathExpr/Steps/Axes/K2-Axes-52
204+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes001
205+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes006
206+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes008
207+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes011
208+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes005
209+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes002
210+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes015
211+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes007
212+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes012
213+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes009
214+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes003
215+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes010
216+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes014
217+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes004
218+test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes013

Subscribers

People subscribed via source and target branches