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

Commit message:
Fixes for rev. 11212.

Requested reviews:
  Zorba Coders (zorba-coders)

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

Fixes for rev. 11212.
-- 
https://code.launchpad.net/~zorba-coders/zorba/fix_rev_11212/+merge/145929
Your team Zorba Coders is requested to review the proposed merge of 
lp:~zorba-coders/zorba/fix_rev_11212 into lp:zorba.
=== modified file 'test/fots_driver/cli.xq'
--- test/fots_driver/cli.xq	2013-01-26 08:41:10 +0000
+++ test/fots_driver/cli.xq	2013-01-31 17:33:22 +0000
@@ -221,8 +221,12 @@
 
 variable $testSetPrefixesMsg := "'testSetPrefixes' was set to: ";
 
+variable $testSetNameMsg := "'testSetName' was set to: ";
+
 variable $testCasePrefixesMsg := "'testCasePrefixes' was set to: ";
 
+variable $testCaseNameMsg := "'testCaseName' was set to: ";
+
 
 switch ($mode)
 
@@ -284,6 +288,8 @@
   trace($testCasePrefixes, $testCasePrefixesMsg);
   trace($dependency, "'dependency' set to:");
   trace($assertions, "'assertions' set to: ");
+  trace($verbose, "'verbose' set to:");
+  trace($mode, "Cli command was set to:");
 
   d:run-fots($fotsPath,
              $fotsZorbaManifestPath,
@@ -294,22 +300,29 @@
              $dependency,
              $assertions,
              xs:boolean($verbose),
-             $expectedFailuresPath)
+             $expectedFailuresPath,
+             $mode)
 }
 
 case "run-test-case"
 return
-{ 
+{
+  trace($testSetName, $testSetNameMsg);
+  trace($testCaseName, $testCaseNameMsg);
+  trace($verbose, "'verbose' set to:");
+  trace($mode, "Cli command was set to:");
+
   d:run-fots($fotsPath,
              $fotsZorbaManifestPath,
-             trace($testSetName, "'testSetName' set to: "),
-             trace($testCaseName,"'testCaseName' set to: "),
+             $testSetName,
+             $exceptedTestSets,
+             $testCaseName,
              $exceptedTestCases,
-             $exceptedTestSets,
              "",
              (),
              xs:boolean($verbose),
-             $expectedFailuresPath)
+             $expectedFailuresPath,
+             $mode)
 }
 
 case "run-and-report"

=== modified file 'test/fots_driver/fots-driver.xq'
--- test/fots_driver/fots-driver.xq	2013-01-30 12:26:39 +0000
+++ test/fots_driver/fots-driver.xq	2013-01-31 17:33:22 +0000
@@ -316,6 +316,7 @@
  : @param $verbose if true, the resulting XML tree will contain more details
  :        about each processed test-case.
  : @param $expectedFailures the root node of the ExpectedFailures.xml file.
+ : @param $cliMode the cli command.
  : @return an XML tree containing info about all the processed tests-cases
  :)
 declare %ann:sequential function driver:run-fots(
@@ -328,12 +329,13 @@
   $dependency             as xs:string,
   $assertions             as xs:string*,
   $verbose                as xs:boolean,
-  $expectedFailuresPath   as xs:string
+  $expectedFailuresPath   as xs:string,
+  $cliMode                as xs:string
 ) as element(fots:test-cases)
 {
-  trace($fotsPath, "The path to FOTS catalog.xml was set to: ");
-  trace($zorbaManifestPath, "The path to FOTSZorbaManifest set to :");
-  trace($expectedFailuresPath, "the path to ExpectedFailures.xml set to:");
+  trace($fotsPath, "Path to FOTS catalog.xml was set to: ");
+  trace($zorbaManifestPath, "Path to FOTSZorbaManifest set to :");
+  trace($expectedFailuresPath, "Path to ExpectedFailures.xml set to:");
 
   try
   {
@@ -394,7 +396,7 @@
       }
     }
 
-    let $expectedFailures := 
+    let $expectedFailures :=
     {
       if ($expectedFailuresPath eq '')
       then ()
@@ -408,7 +410,8 @@
                            $testCaseNames,
                            $exceptedTestCases,
                            $verbose,
-                           $expectedFailures)
+                           $expectedFailures,
+                           $cliMode)
   }
   catch * 
   {
@@ -458,6 +461,7 @@
  : @param $verbose if true, the resulting XML tree will contain more details
  :        about each processed test-case.
  : @param $expectedFailures the root node of the ExpectedFailures.xml file.
+ : @param $cliMode the cli command.
  : @return an XML tree containing info about all the processed tests-cases
  :)
 declare %private %ann:sequential function driver:run-fots(
@@ -468,7 +472,8 @@
   $testCaseNames      as xs:string*,
   $exceptedTestCases  as xs:string*,
   $verbose            as xs:boolean,
-  $expectedFailures   as document-node()?
+  $expectedFailures   as document-node()?,
+  $cliMode            as xs:string
 ) as element(fots:test-cases)
 {
   <fots:test-cases>
@@ -572,7 +577,8 @@
                           $testSetName,
                           $testSetURI,
                           $verbose,
-                          $expectedFailures//TestSet[@name eq $testSetName]/Test[@name eq $testCase/@name])
+                          $expectedFailures//TestSet[@name eq $testSetName]/Test[@name eq $testCase/@name],
+                          $cliMode)
             }
             else
             {
@@ -584,7 +590,8 @@
                           $testSetName,
                           $testSetURI,
                           $verbose,
-                          $expectedFailures//TestSet[@name eq $testSetName]/Test[@name eq $testCase/@name])
+                          $expectedFailures//TestSet[@name eq $testSetName]/Test[@name eq $testCase/@name],
+                          $cliMode)
             }
           }
         }
@@ -613,6 +620,7 @@
  : @param $verbose if true, the resulting XML tree will contain more details
  :        about the test-case.
  : @param $expectedFailure the Test element from the ExpectedFailures.xml file.
+ : @param $cliMode the cli command.
  : @return an XML tree containing info about the result of running the test case.
  :)
 declare %ann:sequential function driver:test(
@@ -623,7 +631,8 @@
   $testSetName        as xs:string?,
   $testSetBaseURI     as xs:anyURI,
   $verbose            as xs:boolean,
-  $expectedFailure    as element(Test)?
+  $expectedFailure    as element(Test)?,
+  $cliMode            as xs:string
 ) as element(fots:test-case)?
 {
 (:TODO Cover the "(:%VARDECL%:)"when there are tests in FOTS that use it:)
@@ -666,11 +675,11 @@
                                                     $envBaseURI,
                                                     $testSetBaseURI);
 
-    (: if $verbose then print the query to a file
-    if ($verbose)
+    (:if $verbose then print the query to a file:)
+    if ($verbose and
+        ($cliMode eq "run-test-case"))
     then util:write-query-to-file($xqxqQuery, $queryName);
     else ();
-    :)
 
     variable $startDateTime := datetime:current-dateTime();
 

=== modified file 'test/fots_driver/reporting.xq'
--- test/fots_driver/reporting.xq	2013-01-26 08:41:10 +0000
+++ test/fots_driver/reporting.xq	2013-01-31 17:33:22 +0000
@@ -86,7 +86,8 @@
                                             '',
                                             (),
                                             $verbose,
-                                            '')
+                                            '',
+                                            'run-test-sets')
                              )
                              }</fots:FOTS-test-suite-result>;
 

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to