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

Proposed by Sorin Marian Nasoi
Status: Merged
Approved by: Sorin Marian Nasoi
Approved revision: 11194
Merged at revision: 11198
Proposed branch: lp:~zorba-coders/zorba/fix_bug_1079006
Merge into: lp:zorba
Diff against target: 91 lines (+28/-7)
3 files modified
test/fots_driver/cli.xq (+10/-4)
test/fots_driver/fots-driver.xq (+8/-2)
test/fots_driver/util.xq (+10/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/fix_bug_1079006
Reviewer Review Type Date Requested Status
Sorin Marian Nasoi Approve
Cezar Andrei Approve
Review via email: mp+144275@code.launchpad.net

Commit message

Fix for lp:1079006.

Description of the change

Fix for lp:1079006.

To post a comment you must log in.
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) :
review: Approve
Revision history for this message
Cezar Andrei (cezar-andrei) wrote :

This is very useful when trying to debug failures.

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/fix_bug_1079006 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job fix_bug_1079006-2013-01-22T14-22-49.153Z is finished.
  The final status was:

  5 tests did not succeed - changes not commited.

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

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

Attempt to merge into lp:zorba failed due to conflicts:

text conflict in test/fots_driver/cli.xq

11194. By Sorin Marian Nasoi <email address hidden>

Merged trunk.

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_1079006-2013-01-24T07-14-03.801Z 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_driver/cli.xq'
2--- test/fots_driver/cli.xq 2013-01-22 23:18:40 +0000
3+++ test/fots_driver/cli.xq 2013-01-24 07:09:26 +0000
4@@ -147,9 +147,10 @@
5
6
7 (:~
8- Enable or disable verbose output
9+ Enable or disable verbose output. When this is set to true the exact query
10+ that is run by XQXQ is also written down into a query_*.xq file.
11 :)
12-declare variable $verbose as xs:string external := "true";
13+declare variable $verbose as xs:string external := "false";
14
15
16 declare function local:usage() as xs:string
17@@ -165,6 +166,10 @@
18 " This way you will see trace information in the CLI window and detailed",
19 " results of the test cases in the 'output.xml'.",
20 "",
21+ " Please note that when Verbose is set to true the query that is executed",
22+ " is written down into a query_TESTCASENAME.xq file, where TESTCASENAME is",
23+ " the test case name.",
24+ "",
25 "zorba -f -q /path/to/cli.xq -e fotsPath:=/path/to/QT3-test-suite/catalog.xml -e fotsZorbaManifestPath:=/path/to/Zorba_manifest.xml -e mode:=list-test-sets",
26 "zorba -f -q /path/to/cli.xq -e fotsPath:=/path/to/QT3-test-suite/catalog.xml -e mode:=list-test-sets",
27 "zorba -f -q /path/to/cli.xq -e fotsPath:=/path/to/QT3-test-suite/catalog.xml -e mode:=list-test-sets -e testSetPrefixes:=prod,app",
28@@ -188,13 +193,14 @@
29
30 (:~
31 Tokenize a string that contains a comma-separated list of tokens.
32- Note: if the input string is empty, the function returns the empty sequence.
33+ Note: if the input string is empty, the function returns the empty string.
34 :)
35 declare %private function local:tokenize(
36 $input as xs:string
37 ) as xs:string*
38 {
39- tokenize($input, ",")
40+ let $tokens := tokenize($input, ",")
41+ return if (exists($tokens)) then $tokens else ""
42 };
43
44
45
46=== modified file 'test/fots_driver/fots-driver.xq'
47--- test/fots_driver/fots-driver.xq 2013-01-22 23:18:40 +0000
48+++ test/fots_driver/fots-driver.xq 2013-01-24 07:09:26 +0000
49@@ -702,8 +702,14 @@
50 $case,
51 $env,
52 $envBaseURI,
53- $testSetBaseURI),
54- $startDateTime := datetime:current-dateTime (),
55+ $testSetBaseURI);
56+
57+ (: if $verbose then print the query to a file :)
58+ if($verbose)
59+ then util:write-query-to-file($xqxqQuery, $queryName);
60+ else ();
61+
62+ variable $startDateTime := datetime:current-dateTime (),
63 $result := driver:xqxq-invoke($xqxqQuery,
64 $case,
65 $verbose,
66
67=== modified file 'test/fots_driver/util.xq'
68--- test/fots_driver/util.xq 2013-01-22 23:18:40 +0000
69+++ test/fots_driver/util.xq 2013-01-24 07:09:26 +0000
70@@ -50,7 +50,7 @@
71 <output:indent value="no" />
72 <output:omit-xml-declaration value="yes" />
73 </output:serialization-parameters>;
74-
75+
76 (:~
77 : The serialization parameters for XML serialization.
78 :)
79@@ -130,3 +130,12 @@
80 then fn:serialize($res, $SerParams)
81 else fn:string($res)
82 };
83+
84+declare %ann:sequential function util:write-query-to-file(
85+ $query as xs:string,
86+ $queryName as xs:string
87+) {
88+ file:write(concat("query_", $queryName, ".xq"),
89+ $query,
90+ $util:serParamXml);
91+};

Subscribers

People subscribed via source and target branches