← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/fixes_fots_driver into lp:zorba

 

Sorin Marian Nasoi has proposed merging lp:~zorba-coders/zorba/fixes_fots_driver into lp:zorba.

Commit message:
Fixes for lp:1130069.

Requested reviews:
  Sorin Marian Nasoi (sorin.marian.nasoi)
Related bugs:
  Bug #1130069 in Zorba: "FOTS driver: serialization error in the outputed test case"
  https://bugs.launchpad.net/zorba/+bug/1130069

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/fixes_fots_driver/+merge/149285

Fixes for lp:1130069.
-- 
https://code.launchpad.net/~zorba-coders/zorba/fixes_fots_driver/+merge/149285
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'test/fots/ImportFOTS.cmake'
--- test/fots/ImportFOTS.cmake	2013-02-10 09:04:50 +0000
+++ test/fots/ImportFOTS.cmake	2013-02-19 14:41:32 +0000
@@ -23,7 +23,7 @@
 
 # Change this to modify which elements in FOTS driver results are output
 # as CDATA
-SET (FOTS_CDATA_ELEMENTS "fots:query test assert-xml")
+SET (FOTS_CDATA_ELEMENTS "test assert-xml")
 
 # Download and unpack pre-created archive
 SET (_outdir "${BUILDDIR}/test/fots")

=== modified file 'test/fots_driver/cli.xq'
--- test/fots_driver/cli.xq	2013-02-09 12:25:16 +0000
+++ test/fots_driver/cli.xq	2013-02-19 14:41:32 +0000
@@ -25,6 +25,9 @@
 import module namespace r =
   "http://www.zorba-xquery.com/fots-driver/reporting"; at "reporting.xq";
 
+declare namespace op = "http://www.zorba-xquery.com/options/features";;
+declare namespace f = "http://www.zorba-xquery.com/features";;
+declare option op:disable "f:trace";
 
 (:~
  : Path to the FOTS catalog.xml file. If the path is relative, it will be 

=== modified file 'test/fots_driver/environment.xq'
--- test/fots_driver/environment.xq	2013-02-11 19:49:26 +0000
+++ test/fots_driver/environment.xq	2013-02-19 14:41:32 +0000
@@ -33,6 +33,9 @@
 declare namespace ann =
   "http://www.zorba-xquery.com/annotations";;
 
+declare namespace op = "http://www.zorba-xquery.com/options/features";;
+declare namespace f = "http://www.zorba-xquery.com/features";;
+declare option op:disable "f:trace";
 
 declare variable $env:hof as xs:string :=
   string-join(

=== modified file 'test/fots_driver/evaluate.xq'
--- test/fots_driver/evaluate.xq	2013-01-31 18:06:16 +0000
+++ test/fots_driver/evaluate.xq	2013-02-19 14:41:32 +0000
@@ -43,6 +43,9 @@
 declare namespace ann =
   "http://www.zorba-xquery.com/annotations";;
 
+declare namespace op = "http://www.zorba-xquery.com/options/features";;
+declare namespace f = "http://www.zorba-xquery.com/features";;
+declare option op:disable "f:trace";
 
 (:~
  : Checks if the result matches the assertions.

=== modified file 'test/fots_driver/feedback.xq'
--- test/fots_driver/feedback.xq	2013-02-11 19:49:26 +0000
+++ test/fots_driver/feedback.xq	2013-02-19 14:41:32 +0000
@@ -31,6 +31,10 @@
 declare namespace err =
   "http://www.w3.org/2005/xqt-errors";;
 
+declare namespace op = "http://www.zorba-xquery.com/options/features";;
+declare namespace f = "http://www.zorba-xquery.com/features";;
+declare option op:disable "f:trace";
+
 declare function feedback:check-pass(
   $result           as item()*,
   $testCaseName     as xs:string?,

=== modified file 'test/fots_driver/fots-driver.xq'
--- test/fots_driver/fots-driver.xq	2013-02-11 19:49:26 +0000
+++ test/fots_driver/fots-driver.xq	2013-02-19 14:41:32 +0000
@@ -56,6 +56,10 @@
 declare namespace ann =
   "http://www.zorba-xquery.com/annotations";;
 
+declare namespace op = "http://www.zorba-xquery.com/options/features";;
+declare namespace f = "http://www.zorba-xquery.com/features";;
+declare option op:disable "f:trace";
+
 (:~
  : Returns the names of all qualifying test sets.
  :
@@ -641,7 +645,7 @@
   {
     variable $queryName := trace(data($case/@name), "processing test case :");
 
-    variable $test := util:get-value($case, $testSetBaseURI, "test");
+    variable $test as xs:string := util:get-value($case, $testSetBaseURI, "test");
 
     variable $envCase := $case/fots:environment;
 

=== modified file 'test/fots_driver/reporting.xq'
--- test/fots_driver/reporting.xq	2013-02-09 12:25:16 +0000
+++ test/fots_driver/reporting.xq	2013-02-19 14:41:32 +0000
@@ -47,6 +47,10 @@
 declare namespace ann =
   "http://www.zorba-xquery.com/annotations";;
 
+declare namespace op = "http://www.zorba-xquery.com/options/features";;
+declare namespace f = "http://www.zorba-xquery.com/features";;
+declare option op:disable "f:trace";
+
 (:~
  : Loops through the test-sets, executes them and reports results.
  : @param $FOTSCatalogFilePath path to the FOTS catalog file.
@@ -89,7 +93,7 @@
 
       file:write("results.xml",
                  $results,
-                 $util:writeXML);
+                 $util:writeText);
 
       reporting:W3C-reporting($results,
                               $FOTSZorbaManifestPath)

=== modified file 'test/fots_driver/util.xq'
--- test/fots_driver/util.xq	2013-01-24 07:06:35 +0000
+++ test/fots_driver/util.xq	2013-02-19 14:41:32 +0000
@@ -40,6 +40,9 @@
 declare namespace ann =
   "http://www.zorba-xquery.com/annotations";;
 
+declare namespace op = "http://www.zorba-xquery.com/options/features";;
+declare namespace f = "http://www.zorba-xquery.com/features";;
+declare option op:disable "f:trace";
 
 (:~
  : The serialization parameters for XML serialization.
@@ -52,13 +55,12 @@
   </output:serialization-parameters>;
 
 (:~
- : The serialization parameters for XML serialization.
+ : The serialization parameters for text serialization.
  :)
- declare variable $util:writeXML :=
+ declare variable $util:writeText :=
   <output:serialization-parameters>
-    <output:method                value="xml" />
+    <output:method                value="text" />
     <output:indent                value="yes"  />
-    <output:omit-xml-declaration  value="no" />
   </output:serialization-parameters>;
 
 
@@ -87,7 +89,7 @@
     return
       if ($node/@file)
       then fn:unparsed-text(resolve-uri($node/@file, $envBaseURI))
-      else fn:data($node)
+      else fn:string($node)
   }
   catch *
   {
@@ -137,5 +139,5 @@
 ) {
   file:write(concat("query_", $queryName, ".xq"),
              $query,
-             $util:serParamXml);
+             $util:writeText);
 };


Follow ups