Sorin Marian Nasoi has proposed merging lp:~zorba-coders/zorba/split_XQ10_from_XQ30_reporting into lp:zorba.
Commit message: - split the XQ10 from XQ30 reporting; by default XQ30 reporting is assumed. Requested reviews: Sorin Marian Nasoi (sorin.marian.nasoi) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/split_XQ10_from_XQ30_reporting/+merge/164749 -- https://code.launchpad.net/~zorba-coders/zorba/split_XQ10_from_XQ30_reporting/+merge/164749 Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'test/fots_driver/README.TXT' --- test/fots_driver/README.TXT 2013-04-09 14:22:41 +0000 +++ test/fots_driver/README.TXT 2013-05-20 15:01:29 +0000 @@ -56,6 +56,8 @@ zorba -f -q /path/to/cli.xq -e mode:=run-test-set -e testSetName:=fn-matches -o result.xml --indent zorba -f -q /path/to/cli.xq -e mode:=run-test-set -e testSetName:=fn-matches -e usePlanSerializer:=true -o result.xml --indent zorba -f -q /path/to/cli.xq -e mode:=run-test-case -e testSetName:=prod-Literal -e testCaseName:=Literals001 -o result.xml --indent -zorba -f -q /path/to/cli.xq -e mode:=run-and-report -o results_Zorba_XQ30.xml --indent --disable-http-resolution -zorba -f -q /path/to/cli.xq -e mode:=report -e resultsFilePath:=results.xml -o results_Zorba_XQ30.xml --indent -zorba -f -q /path/to/cli.xq -e mode:=generate-expected-failures -e resultsFilePath:=failures.xml -o ExpectedFailures.xml --indent +zorba -f -q /path/to/cli.xq -e mode:=run-and-report -e XQueryVersion:=XQ30 -o results_Zorba_XQ30.xml --indent --disable-http-resolution +zorba -f -q /path/to/cli.xq -e mode:=run-and-report -e XQueryVersion:=XQ10 -o results_Zorba_XQ10.xml --indent --disable-http-resolution +zorba -f -q /path/to/cli.xq -e mode:=report -e resultsFilePath:=results.xml -e XQueryVersion:=XQ30 -o results_Zorba_XQ30.xml --indent +zorba -f -q /path/to/cli.xq -e mode:=report -e resultsFilePath:=results.xml -e XQueryVersion:=XQ10 -o results_Zorba_XQ10.xml --indent + === removed file 'test/fots_driver/W3C_submission_template.xml' --- test/fots_driver/W3C_submission_template.xml 2013-05-08 10:14:19 +0000 +++ test/fots_driver/W3C_submission_template.xml 1970-01-01 00:00:00 +0000 @@ -1,17 +0,0 @@ -<test-suite-result xmlns="http://www.w3.org/2012/08/qt-fots-results"> - <submission anonymous="false"> - <created by="Sorin Nasoi" - email="sorin.marian.nasoi_at_gmail.com" - organization="FLWOR Foundation" - on="2013-05-08"/> - <test-run test-suite-version="CVS" - date-run="2013-05-08"/> - <notes/> - </submission> - <product vendor="FLWOR Foundation" - name="Zorba" - version="11439" - released="false" - open-source="true" - language="XQ30"/> -</test-suite-result> === modified file 'test/fots_driver/cli.xq' --- test/fots_driver/cli.xq 2013-04-17 23:25:47 +0000 +++ test/fots_driver/cli.xq 2013-05-20 15:01:29 +0000 @@ -22,6 +22,9 @@ import module namespace d = "http://www.zorba-xquery.com/fots-driver" at "fots-driver.xq"; +import module namespace file = + "http://expath.org/ns/file"; + import module namespace r = "http://www.zorba-xquery.com/fots-driver/reporting" at "reporting.xq"; @@ -165,6 +168,11 @@ :) declare variable $usePlanSerializer as xs:string external := "false"; +(:~ + : Set reporting mode for XQuery 3.0 (meaning XQ30) or XQuery 1.0 (meaning XQ10) + : By default this is set to XQ30 + :) +declare variable $XQueryVersion as xs:string external := "XQ30"; declare function local:usage() as xs:string { @@ -205,8 +213,10 @@ "zorba -f -q /path/to/cli.xq -e mode:=run-test-set -e testSetName:=fn-matches -o result.xml --indent", "zorba -f -q /path/to/cli.xq -e mode:=run-test-set -e testSetName:=fn-matches -e usePlanSerializer:=true -o result.xml --indent", "zorba -f -q /path/to/cli.xq -e mode:=run-test-case -e testSetName:=prod-Literal -e testCaseName:=Literals001 -o result.xml --indent", - "zorba -f -q /path/to/cli.xq -e mode:=run-and-report -o results_Zorba_XQ30.xml --indent --disable-http-resolution", - "zorba -f -q /path/to/cli.xq -e mode:=report -e resultsFilePath:=results.xml -o results_Zorba_XQ30.xml --indent", + "zorba -f -q /path/to/cli.xq -e mode:=run-and-report -e XQueryVersion:=XQ30 -o results_Zorba_XQ30.xml --indent --disable-http-resolution", + "zorba -f -q /path/to/cli.xq -e mode:=run-and-report -e XQueryVersion:=XQ10 -o results_Zorba_XQ10.xml --indent --disable-http-resolution", + "zorba -f -q /path/to/cli.xq -e mode:=report -e resultsFilePath:=results.xml -e XQueryVersion:=XQ30 -o results_Zorba_XQ30.xml --indent", + "zorba -f -q /path/to/cli.xq -e mode:=report -e resultsFilePath:=results.xml -e XQueryVersion:=XQ10 -o results_Zorba_XQ10.xml --indent", "" ), "
") }; @@ -341,9 +351,20 @@ case "run-and-report" return -{ +{ + trace($XQueryVersion, "XQuery version :"); + + variable $prefix:= concat("reporting", + file:directory-separator(), + if($XQueryVersion = "XQ10") (:prevent invalid values:) + then "XQ10" else "XQ30", + file:directory-separator()); + r:run-and-report($fotsPath, - $fotsZorbaManifestPath, + concat($prefix, + "FOTSZorbaManifest.xml"), + concat($prefix, + "W3C_submission_template.xml"), $expectedFailuresPath, $exceptedTestSets) } @@ -351,7 +372,18 @@ case "report" return { - r:report($fotsZorbaManifestPath, + trace($XQueryVersion, "XQuery version :"); + + variable $prefix:= concat("reporting", + file:directory-separator(), + if($XQueryVersion = "XQ10")(:prevent invalid values:) + then "XQ10" else "XQ30", + file:directory-separator()); + + r:report(concat($prefix, + "FOTSZorbaManifest.xml"), + concat($prefix, + "W3C_submission_template.xml"), $resultsFilePath) } === added directory 'test/fots_driver/reporting' === modified file 'test/fots_driver/reporting.xq' --- test/fots_driver/reporting.xq 2013-04-17 23:25:47 +0000 +++ test/fots_driver/reporting.xq 2013-05-20 15:01:29 +0000 @@ -52,6 +52,7 @@ : Loops through the test-sets, executes them and reports results. : @param $FOTSCatalogFilePath path to the FOTS catalog file. : @param $FOTSZorbaManifestPath path to the FOTS Zorba manifest file. + : @param $SubmissionTemplatePath path to the SubmissionTemplate file. : @param $expectedFailuresPath the path to the FOTSExpectedFailures.xml. : @param $exceptedTestSets lists of test sets that are not run(empty sequence : means all test sets will be run). @@ -60,6 +61,7 @@ declare %ann:sequential function reporting:run-and-report( $FOTSCatalogFilePath as xs:string, $FOTSZorbaManifestPath as xs:string, + $SubmissionTemplatePath as xs:string, $expectedFailuresPath as xs:string, $exceptedTestSets as xs:string* ) as document-node() @@ -78,23 +80,28 @@ 'run-test-sets', fn:false()); - file:write("results.xml", + file:write(if(contains($FOTSZorbaManifestPath,"XQ30")) + then "results_XQ30.xml" + else "results_XQ10.xml", $results, $util:writeXML); reporting:W3C-reporting($results, - $FOTSZorbaManifestPath) + $FOTSZorbaManifestPath, + $SubmissionTemplatePath) } }; (:~ : Loops through the test sets, executes them and reports results. : @param $FOTSZorbaManifestPath path to the FOTS Zorba manifest file. + : @param $SubmissionTemplatePath path to the SubmissionTemplate file. : @param $resultsFilePath path to the FOTS results file. : @return The W3C conformance submission file. :) declare %ann:sequential function reporting:report( $FOTSZorbaManifestPath as xs:string, + $SubmissionTemplatePath as xs:string, $resultsFilePath as xs:string ) as document-node() { @@ -102,7 +109,8 @@ { { reporting:W3C-reporting(parse-xml(file:read-text($resultsFilePath))/fots:test-cases, - $FOTSZorbaManifestPath) + $FOTSZorbaManifestPath, + $SubmissionTemplatePath) } } catch * @@ -115,11 +123,13 @@ : Format the W3C conformance report. : @param $results FOTS results file. : @param $FOTSZorbaManifestPath path to the FOTS Zorba manifest file. + : @param $SubmissionTemplatePath path to the SubmissionTemplate file. : @return The W3C conformance submission file. :) declare %ann:sequential function reporting:W3C-reporting( $results as element(fots:test-cases)?, - $FOTSZorbaManifestPath as xs:string + $FOTSZorbaManifestPath as xs:string, + $SubmissionTemplatePath as xs:string ) as document-node() { try @@ -129,17 +139,13 @@ then { error($fots-err:errNA, - "The 'FOTSZorbaManifest.xml' was not found."); + "'FOTSZorbaManifest.xml' file was not found."); } else (); variable $FOTSZorbaManifest := parse-xml(file:read-text(resolve-uri($FOTSZorbaManifestPath))); - variable $CLIBaseURI := resolve-uri(util:parent-folder($FOTSZorbaManifestPath)); - - variable $W3CTemplatePath := resolve-uri("W3C_submission_template.xml", $CLIBaseURI); - - if (not(file:is-file($W3CTemplatePath))) + if (not(file:is-file(resolve-uri($SubmissionTemplatePath)))) then { error($fots-err:errNA, @@ -147,7 +153,7 @@ } else (); - variable $W3CTemplate := parse-xml(file:read-text($W3CTemplatePath)); + variable $W3CTemplate := parse-xml(file:read-text(resolve-uri($SubmissionTemplatePath))); (: add dependencies:) (insert nodes === added directory 'test/fots_driver/reporting/XQ10' === added file 'test/fots_driver/reporting/XQ10/FOTSZorbaManifest.xml' --- test/fots_driver/reporting/XQ10/FOTSZorbaManifest.xml 1970-01-01 00:00:00 +0000 +++ test/fots_driver/reporting/XQ10/FOTSZorbaManifest.xml 2013-05-20 15:01:29 +0000 @@ -0,0 +1,73 @@ +<test-suite-result xmlns="http://www.w3.org/2010/09/qt-fots-catalog"> + <dependency type="feature" value="collection-stability" satisfied="false"/> + <dependency type="feature" value="directory-as-collection-uri" satisfied="false"/> + <dependency type="feature" value="higherOrderFunctions" satisfied="true"/> + <dependency type="feature" value="moduleImport" satisfied="true"/> + <dependency type="feature" value="namespace-axis" satisfied="false"/> + <dependency type="feature" value="schema-location-hint" satisfied="false"/> <!-- Is this correct? --> + <dependency type="feature" value="schemaAware" satisfied="true"/> + <dependency type="feature" value="schemaImport" satisfied="true"/> + <dependency type="feature" value="schemaValidation" satisfied="true"/> + <dependency type="feature" value="staticTyping" satisfied="false"/> + <dependency type="feature" value="xpath-1.0-compatibility" satisfied="true"/> <!-- Is this correct? --> + <dependency type="feature" value="infoset-dtd" satisfied="true"/> + + <!-- We are not interested in running XPath test-cases, we only run XQuery test cases --> + <dependency type="spec" value="XP10+" satisfied="false"/> + <dependency type="spec" value="XP20" satisfied="false"/> + <dependency type="spec" value="XP20+" satisfied="false"/> + <dependency type="spec" value="XP30+" satisfied="false"/> + + <!-- We run XQ10 test-cases --> + <dependency type="spec" value="XP10 XQ10" satisfied="true"/> + <dependency type="spec" value="XP20 XQ10" satisfied="true"/> + <dependency type="spec" value="XQ10" satisfied="true"/> + <dependency type="spec" value="XQ10 XP20" satisfied="true"/> + + <!-- We run test-cases compatible with XQuery 1.0 meaning XQ10+ and XQ10 --> + <dependency type="spec" value="XP30+ XQ10+" satisfied="true"/> + <dependency type="spec" value="XQ10+" satisfied="true"/> + <dependency type="spec" value="XQ10+ XP20+" satisfied="true"/> + <dependency type="spec" value="XQ10+ XP30+" satisfied="true"/> + + <!-- We do not run test-cases compatible with XQuery 3.0 meaning XQ30+ and XQ30 --> + <dependency type="spec" value="XP30+ XQ30+" satisfied="false"/> + <dependency type="spec" value="XQ30" satisfied="false"/> + <dependency type="spec" value="XQ30 XP30" satisfied="false"/> + <dependency type="spec" value="XQ30+" satisfied="false"/> + <dependency type="spec" value="XQ30+ XP30+" satisfied="false"/> + + <dependency type="spec" value="XT30+" satisfied="false"/> + + <dependency type="xml-version" value="1.0" satisfied="true"/> + <dependency type="xml-version" value="1.0:4-" satisfied="true"/> + <dependency type="xml-version" value="1.0:5+ 1.1" satisfied="false"/> + <dependency type="xml-version" value="1.1" satisfied="false"/> + + <dependency type="language" value="de" satisfied="false"/> + <dependency type="language" value="en" satisfied="true"/> + <dependency type="language" value="xib" satisfied="false"/> + + <dependency type="format-integer-sequence" value="Α" satisfied="false"/> + <dependency type="format-integer-sequence" value="α" satisfied="false"/> + <dependency type="format-integer-sequence" value="١" satisfied="true"/> + <dependency type="format-integer-sequence" value="①" satisfied="true"/> + <dependency type="format-integer-sequence" value="⑴" satisfied="true"/> + <dependency type="format-integer-sequence" value="⒈" satisfied="true"/> + <dependency type="format-integer-sequence" value="一" satisfied="false"/> + <dependency type="format-integer-sequence" value="ﯴ" satisfied="false"/> + + <dependency type="default-language" value="en" satisfied="true"/> + <dependency type="unicode-normalization-form" value="FULLY-NORMALIZED" satisfied="true"/> + <dependency type="unicode-normalization-form" value="NFD" satisfied="true"/> + <dependency type="unicode-normalization-form" value="NFKC" satisfied="true"/> + <dependency type="unicode-normalization-form" value="NFKD" satisfied="true"/> + <dependency type="calendar" value="CB" satisfied="false"/> + + <dependency type="xsd-version" value="1.0" satisfied="false"/> + <dependency type="xsd-version" value="1.1" satisfied="true"/> + + + <!-- Are these correct? --> + <dependency type="limits" value="year_lt_0" satisfied="true"/> +</test-suite-result> === added file 'test/fots_driver/reporting/XQ10/W3C_submission_template.xml' --- test/fots_driver/reporting/XQ10/W3C_submission_template.xml 1970-01-01 00:00:00 +0000 +++ test/fots_driver/reporting/XQ10/W3C_submission_template.xml 2013-05-20 15:01:29 +0000 @@ -0,0 +1,17 @@ +<test-suite-result xmlns="http://www.w3.org/2012/08/qt-fots-results"> + <submission anonymous="false"> + <created by="Sorin Nasoi" + email="sorin.marian.nasoi_at_gmail.com" + organization="FLWOR Foundation" + on="2013-05-08"/> + <test-run test-suite-version="CVS" + date-run="2013-05-17"/> + <notes/> + </submission> + <product vendor="FLWOR Foundation" + name="Zorba" + version="2.9" + released="true" + open-source="true" + language="XQ10"/> +</test-suite-result> === added directory 'test/fots_driver/reporting/XQ30' === added file 'test/fots_driver/reporting/XQ30/FOTSZorbaManifest.xml' --- test/fots_driver/reporting/XQ30/FOTSZorbaManifest.xml 1970-01-01 00:00:00 +0000 +++ test/fots_driver/reporting/XQ30/FOTSZorbaManifest.xml 2013-05-20 15:01:29 +0000 @@ -0,0 +1,72 @@ +<test-suite-result xmlns="http://www.w3.org/2010/09/qt-fots-catalog"> + <dependency type="feature" value="collection-stability" satisfied="false"/> + <dependency type="feature" value="directory-as-collection-uri" satisfied="false"/> + <dependency type="feature" value="higherOrderFunctions" satisfied="true"/> + <dependency type="feature" value="moduleImport" satisfied="true"/> + <dependency type="feature" value="namespace-axis" satisfied="false"/> + <dependency type="feature" value="schema-location-hint" satisfied="false"/> <!-- Is this correct? --> + <dependency type="feature" value="schemaAware" satisfied="true"/> + <dependency type="feature" value="schemaImport" satisfied="true"/> + <dependency type="feature" value="schemaValidation" satisfied="true"/> + <dependency type="feature" value="staticTyping" satisfied="false"/> + <dependency type="feature" value="xpath-1.0-compatibility" satisfied="true"/> <!-- Is this correct? --> + <dependency type="feature" value="infoset-dtd" satisfied="true"/> + + <!-- We are not interested in running XPath test-cases, we only run XQuery test cases --> + <dependency type="spec" value="XP10+" satisfied="false"/> + <dependency type="spec" value="XP20" satisfied="false"/> + <dependency type="spec" value="XP20+" satisfied="false"/> + <dependency type="spec" value="XP30+" satisfied="false"/> + + <!-- We are not interested in running XQ10 test-cases --> + <dependency type="spec" value="XP10 XQ10" satisfied="false"/> + <dependency type="spec" value="XP20 XQ10" satisfied="false"/> + <dependency type="spec" value="XQ10" satisfied="false"/> + <dependency type="spec" value="XQ10 XP20" satisfied="false"/> + + <!-- We only run test-cases compatible with XQuery 3.0 meaning XQ10+ and XQ30 --> + <dependency type="spec" value="XP30+ XQ10+" satisfied="true"/> + <dependency type="spec" value="XQ10+" satisfied="true"/> + <dependency type="spec" value="XQ10+ XP20+" satisfied="true"/> + <dependency type="spec" value="XQ10+ XP30+" satisfied="true"/> + + <dependency type="spec" value="XP30+ XQ30+" satisfied="true"/> + <dependency type="spec" value="XQ30" satisfied="true"/> + <dependency type="spec" value="XQ30 XP30" satisfied="true"/> + <dependency type="spec" value="XQ30+" satisfied="true"/> + <dependency type="spec" value="XQ30+ XP30+" satisfied="true"/> + + <dependency type="spec" value="XT30+" satisfied="false"/> + + <dependency type="xml-version" value="1.0" satisfied="true"/> + <dependency type="xml-version" value="1.0:4-" satisfied="true"/> + <dependency type="xml-version" value="1.0:5+ 1.1" satisfied="false"/> + <dependency type="xml-version" value="1.1" satisfied="false"/> + + <dependency type="language" value="de" satisfied="false"/> + <dependency type="language" value="en" satisfied="true"/> + <dependency type="language" value="xib" satisfied="false"/> + + <dependency type="format-integer-sequence" value="Α" satisfied="false"/> + <dependency type="format-integer-sequence" value="α" satisfied="false"/> + <dependency type="format-integer-sequence" value="١" satisfied="true"/> + <dependency type="format-integer-sequence" value="①" satisfied="true"/> + <dependency type="format-integer-sequence" value="⑴" satisfied="true"/> + <dependency type="format-integer-sequence" value="⒈" satisfied="true"/> + <dependency type="format-integer-sequence" value="一" satisfied="false"/> + <dependency type="format-integer-sequence" value="ﯴ" satisfied="false"/> + + <dependency type="default-language" value="en" satisfied="true"/> + <dependency type="unicode-normalization-form" value="FULLY-NORMALIZED" satisfied="true"/> + <dependency type="unicode-normalization-form" value="NFD" satisfied="true"/> + <dependency type="unicode-normalization-form" value="NFKC" satisfied="true"/> + <dependency type="unicode-normalization-form" value="NFKD" satisfied="true"/> + <dependency type="calendar" value="CB" satisfied="false"/> + + <dependency type="xsd-version" value="1.0" satisfied="false"/> + <dependency type="xsd-version" value="1.1" satisfied="true"/> + + + <!-- Are these correct? --> + <dependency type="limits" value="year_lt_0" satisfied="true"/> +</test-suite-result> === added file 'test/fots_driver/reporting/XQ30/W3C_submission_template.xml' --- test/fots_driver/reporting/XQ30/W3C_submission_template.xml 1970-01-01 00:00:00 +0000 +++ test/fots_driver/reporting/XQ30/W3C_submission_template.xml 2013-05-20 15:01:29 +0000 @@ -0,0 +1,17 @@ +<test-suite-result xmlns="http://www.w3.org/2012/08/qt-fots-results"> + <submission anonymous="false"> + <created by="Sorin Nasoi" + email="sorin.marian.nasoi_at_gmail.com" + organization="FLWOR Foundation" + on="2013-05-08"/> + <test-run test-suite-version="CVS" + date-run="2013-05-17"/> + <notes/> + </submission> + <product vendor="FLWOR Foundation" + name="Zorba" + version="2.9" + released="true" + open-source="true" + language="XQ30"/> +</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