Merge lp:~zorba-coders/zorba/fix_bug_1187807 into lp:zorba

Proposed by Sorin Marian Nasoi
Status: Merged
Approved by: Sorin Marian Nasoi
Approved revision: 11504
Merged at revision: 11507
Proposed branch: lp:~zorba-coders/zorba/fix_bug_1187807
Merge into: lp:zorba
Diff against target: 228 lines (+45/-37)
3 files modified
test/fots/CMakeLists.txt (+4/-7)
test/fots_driver/environment.xq (+16/-5)
test/fots_driver/fots-driver.xq (+25/-25)
To merge this branch: bzr merge lp:~zorba-coders/zorba/fix_bug_1187807
Reviewer Review Type Date Requested Status
Sorin Marian Nasoi Approve
Chris Hillery Approve
Review via email: mp+168681@code.launchpad.net

Commit message

- temporary fix for lp:1187807: FOTS driver adds a base-uri in the prolog; the complete/clean fix requires lp:1133806 to be fixed.

To post a comment you must log in.
11501. By sorin.marian.nasoi <email address hidden>

- fix for lp:1187807

11502. By sorin.marian.nasoi <email address hidden>

- updated LP bug numbers.

Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) :
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 fix_bug_1187807-2013-06-11T14-55-55.909Z 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 Approve, 1 Pending.

11503. By sorin.marian.nasoi <email address hidden>

- corrected LP byg number

Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) :
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 fix_bug_1187807-2013-06-12T08-06-04.45Z 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 'test/fots/CMakeLists.txt'
2--- test/fots/CMakeLists.txt 2013-06-11 15:47:07 +0000
3+++ test/fots/CMakeLists.txt 2013-06-12 08:04:28 +0000
4@@ -129,6 +129,7 @@
5 EXPECTED_FOTS_FAILURE (DISPUTED fn-format-dateTime format-dateTime-006 22282)
6 EXPECTED_FOTS_FAILURE (DISPUTED misc-XMLEdition XML10-4ed-Excluded-char-1 13869)
7 EXPECTED_FOTS_FAILURE (DISPUTED prod-ModuleImport modules-22 22317)
8+EXPECTED_FOTS_FAILURE (DISPUTED app-CatalogCheck Catalog011 22327)
9
10 # Next three possibly unique to old RQ machine, but they need to be
11 # marked for the RQ to pass.
12@@ -140,8 +141,6 @@
13 # This test passes on the old and new RQ machines, but fails for Sorin.
14 #EXPECTED_FOTS_FAILURE (fn-normalize-unicode fn-normalize-unicode-11 0)
15
16-EXPECTED_FOTS_FAILURE (app-CatalogCheck Catalog010 1187807)
17-EXPECTED_FOTS_FAILURE (app-CatalogCheck Catalog011 1187807)
18 EXPECTED_FOTS_FAILURE (fn-fold-left fold-left-009 1187685)
19 EXPECTED_FOTS_FAILURE (fn-for-each-pair fn-for-each-pair-026 1187685)
20 EXPECTED_FOTS_FAILURE (fn-format-number numberformat60a 1167609)
21@@ -160,10 +159,8 @@
22 EXPECTED_FOTS_FAILURE (fn-normalize-space fn-normalize-space-25 1187802)
23 EXPECTED_FOTS_FAILURE (fn-normalize-unicode cbcl-fn-normalize-unicode-001 1187813)
24 EXPECTED_FOTS_FAILURE (fn-normalize-unicode cbcl-fn-normalize-unicode-006 1187813)
25-EXPECTED_FOTS_FAILURE (fn-parse-xml parse-xml-001 1187807)
26-EXPECTED_FOTS_FAILURE (fn-parse-xml parse-xml-010 1188260)
27-EXPECTED_FOTS_FAILURE (fn-parse-xml parse-xml-011 1187807)
28-EXPECTED_FOTS_FAILURE (fn-parse-xml-fragment parse-xml-fragment-001 1187807)
29+EXPECTED_FOTS_FAILURE (fn-parse-xml parse-xml-010 1189927)
30+EXPECTED_FOTS_FAILURE (fn-parse-xml parse-xml-011 1188260)
31 EXPECTED_FOTS_FAILURE (fn-parse-xml-fragment parse-xml-fragment-016 1188269)
32 EXPECTED_FOTS_FAILURE (fn-parse-xml-fragment parse-xml-fragment-017 1188269)
33 EXPECTED_FOTS_FAILURE (fn-parse-xml-fragment parse-xml-fragment-020 1188269)
34@@ -218,7 +215,7 @@
35 EXPECTED_FOTS_FAILURE (prod-Annotation annotation-assertion-8 1172270)
36 EXPECTED_FOTS_FAILURE (prod-Annotation annotation-assertion-9 1172270)
37 EXPECTED_FOTS_FAILURE (prod-Annotation annotation-assertion-10 1172270)
38-EXPECTED_FOTS_FAILURE (prod-BaseURIDecl K2-BaseURIProlog-5 1187807)
39+EXPECTED_FOTS_FAILURE (prod-BaseURIDecl K2-BaseURIProlog-5 1133806)
40 EXPECTED_FOTS_FAILURE (prod-CastableExpr K-SeqExprCastable-5a 1188281)
41 EXPECTED_FOTS_FAILURE (prod-CastExpr CastAsNamespaceSensitiveType-11 1188279)
42 EXPECTED_FOTS_FAILURE (prod-CastExpr CastAsNamespaceSensitiveType-12 1188279)
43
44=== modified file 'test/fots_driver/environment.xq'
45--- test/fots_driver/environment.xq 2013-05-17 23:57:15 +0000
46+++ test/fots_driver/environment.xq 2013-06-12 08:04:28 +0000
47@@ -82,16 +82,27 @@
48 : @param $env the non-local environment of the test-case, if any. It is an
49 : environment specified either at the test-set level or at the catalog
50 : level and is referenced by the test-case.
51+ : @param $test the raw query text.
52+ : @param $testSetURI the URI of the directory that contains the file of the
53+ : associated test-set.
54 : @param $envCase the local environment of the test-case, if any.
55 : @return the declare base-uri prolog statement.
56 :)
57 declare function env:decl-base-uri(
58- $env as element(fots:environment)?,
59- $envCase as element(fots:environment)?
60+ $env as element(fots:environment)?,
61+ $envCase as element(fots:environment)?,
62+ $test as xs:string,
63+ $testSetURI as xs:anyURI
64 ) as xs:string?
65 {
66- for $baseURI in ($env/fots:static-base-uri, $envCase/fots:static-base-uri)
67- return concat("declare base-uri '", $baseURI/@uri, "';")
68+ if($env/fots:static-base-uri, $envCase/fots:static-base-uri) then
69+ for $baseURI in ($env/fots:static-base-uri, $envCase/fots:static-base-uri)
70+ return concat('declare base-uri "', $baseURI/@uri, '";')
71+ else if(not(contains($test,"declare base-uri ") or
72+ contains($test,"xquery version ") or
73+ contains($test,"declare(::)base-uri"))) then
74+ concat('declare base-uri "', $testSetURI, '";')
75+ else ()
76 };
77
78
79@@ -161,7 +172,7 @@
80 $test as xs:string
81 ) as xs:boolean
82 {
83- contains($test, concat("import schema namespace ", $prefix))
84+ contains($test, concat('import schema namespace ', $prefix))
85 };
86
87
88
89=== modified file 'test/fots_driver/fots-driver.xq'
90--- test/fots_driver/fots-driver.xq 2013-05-17 23:57:15 +0000
91+++ test/fots_driver/fots-driver.xq 2013-06-12 08:04:28 +0000
92@@ -822,8 +822,8 @@
93 : @param $deps the dependencies that should be checked for given test-case.
94 : These may be defined at test-set level and/or test-case level.
95 : @param $testSetName the name of the test-set.
96- : @param $testSetBaseURI the URI of the directory that contains the file of the
97- associated test-set.
98+ : @param $testSetURI the URI of the directory that contains the file of the
99+ : associated test-set.
100 : @param $verbose if true, the resulting XML tree will contain more details
101 : about the test-case.
102 : @param $expFailureTC the 'Test' element from the ExpectedFailures.xml file.
103@@ -834,17 +834,17 @@
104 : @return an XML tree containing the result of running the test-case.
105 :)
106 declare %private %ann:sequential function driver:run-test-case(
107- $case as element(fots:test-case),
108- $env as element(fots:environment)?,
109- $envBaseURI as xs:anyURI?,
110- $deps as element(fots:dependency)*,
111- $testSetName as xs:string,
112- $testSetBaseURI as xs:anyURI,
113- $verbose as xs:boolean,
114- $expFailureTC as element(Test)?,
115- $ctestMode as xs:boolean,
116- $cliMode as xs:string,
117- $usePlanSerializer as xs:boolean
118+ $case as element(fots:test-case),
119+ $env as element(fots:environment)?,
120+ $envBaseURI as xs:anyURI?,
121+ $deps as element(fots:dependency)*,
122+ $testSetName as xs:string,
123+ $testSetURI as xs:anyURI,
124+ $verbose as xs:boolean,
125+ $expFailureTC as element(Test)?,
126+ $ctestMode as xs:boolean,
127+ $cliMode as xs:string,
128+ $usePlanSerializer as xs:boolean
129 ) as element(fots:test-case)?
130 {
131 (:TODO Cover the "(:%VARDECL%:)"when there are tests in FOTS that use it:)
132@@ -858,7 +858,7 @@
133
134 variable $queryName := $case/@name;
135
136- variable $test as xs:string := util:get-value($case, $testSetBaseURI, "test");
137+ variable $test as xs:string := util:get-value($case, $testSetURI, "test");
138
139 variable $envCase := $case/fots:environment;
140
141@@ -868,7 +868,7 @@
142 (
143 env:add-xquery-version-decl(($deps, $case//fots:dependency), $test),
144
145- env:decl-base-uri($env, $envCase),
146+ env:decl-base-uri($env, $envCase, $test, $testSetURI),
147
148 env:decl-def-elem-namespace($env, $envCase),
149
150@@ -877,7 +877,7 @@
151 env:decl-decimal-formats(($env/fots:decimal-format,
152 $envCase/fots:decimal-format)),
153
154- env:add-var-decl($env, $envCase, $envBaseURI, $testSetBaseURI),
155+ env:add-var-decl($env, $envCase, $envBaseURI, $testSetURI),
156
157 $test
158 ),
159@@ -888,7 +888,7 @@
160 $case,
161 $env,
162 $envBaseURI,
163- $testSetBaseURI,
164+ $testSetURI,
165 $deps);
166
167 (:if $verbose then print the query to a file:)
168@@ -902,7 +902,7 @@
169 variable $result := execute:xqxq-invoke($xqxqQuery,
170 $case,
171 $verbose,
172- $testSetBaseURI,
173+ $testSetURI,
174 $usePlanSerializer);
175
176 variable $duration := (datetime:current-dateTime() - $startDateTime);
177@@ -953,7 +953,7 @@
178 $case/fots:result/*,
179 $err:code,
180 $err:description,
181- $testSetBaseURI),
182+ $testSetURI),
183 "fots-driver.xq:driver:test catch",
184 $testSetName,
185 $env,
186@@ -975,7 +975,7 @@
187 : @param $case the test case.
188 : @param $env the environment.
189 : @param $envBaseURI URI of the environment.
190- : @param $testSetBaseURI the URI of the directory that contains the file of the
191+ : @param $testSetURI the URI of the directory that contains the file of the
192 : associated test set.
193 : @param $deps the dependencies that should be checked for given test-case.
194 : These may be defined at test-set level and/or test-case level.
195@@ -986,18 +986,18 @@
196 $case as element(fots:test-case),
197 $env as element(fots:environment)?,
198 $envBaseURI as xs:anyURI?,
199- $testSetBaseURI as xs:anyURI,
200+ $testSetURI as xs:anyURI,
201 $deps as element(fots:dependency)*
202 ) as xs:string
203 {
204 let $resolver as xs:string? := env:resolver($case,
205 $env,
206 $envBaseURI,
207- $testSetBaseURI)
208+ $testSetURI)
209 let $mapper as xs:string? := env:mapper($case,
210 $env,
211 $envBaseURI,
212- $testSetBaseURI)
213+ $testSetURI)
214 let $needsDTDValidation := exists($deps[@type="feature" and @value="infoset-dtd"])
215 return
216 string-join
217@@ -1063,9 +1063,9 @@
218 else "&#xA;);"),
219
220 env:set-context-item($env, $envBaseURI, $needsDTDValidation),
221- env:set-context-item($case/fots:environment, $testSetBaseURI, $needsDTDValidation),
222+ env:set-context-item($case/fots:environment, $testSetURI, $needsDTDValidation),
223 env:set-variables($env, $envBaseURI),
224- env:set-variables($case/fots:environment, $testSetBaseURI),
225+ env:set-variables($case/fots:environment, $testSetURI),
226
227 "xqxq:evaluate($queryID),",
228 "",

Subscribers

People subscribed via source and target branches