Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structuralrelationships2 into lp:zorba

2011-10-24 Thread Federico Cavalieri
> >"The returned URI is stable, i.e. it does not change when other nodes are
> > inserted, deleted or modified"

> Obviously, it is not entirely correct in the current implementation:
> Consider 2 nodes P and C, where C is a child of P; if P is deleted, the result
> of node-position(C) before P's deletion is different than after P's deletion
> (because P and its subtree become part of a new tree). In other words, the
> node position of C changes when P is deleted. Maybe we should say that the
> node position of a node is stable as long as the node remains in its current
> collection and tree?
 
Yes, you are right. However even with the limitation you propose another problem
would arise in the current implementation. (ie. TEXT_ORDPATH off)
Consider 3 nodes C1 C2 and C3 children of a node P. Assume that C2 is a text 
node.
This means that its ordpath is computed on the fly. If C1 is labeled 1.1 and C3 
1.3, 
the label of C2 would be 1.2.1. Now if you remove C3 and compute again the 
label of
C2 it would be 1.3. That is not stable even if it remains in the same 
collection and
tree.

I am removing the whole phrase.

> Second, when you say that you rely on it, does it mean that you may need to
> compare 2 node positions that were obtained in different snapshots? And if so,
> do you expect that the result of such a comparison says anything about the
> positional relationship of the two corresponding nodes at any point in time?
> (in other words, is what I wrote for the is-ancestor function really correct?)

I am (was?*) relying on the fact that the label of two nodes belonging to the 
same tree do not change over time. I am (was?*) interseted in some of the 
relations
(ie. ancestor-descendant) which are not affected by the text node ordpath 
on-the-fly
computation.


* Just noticed that TEXT_ORDPATH off means that in the interested cases I can 
no longer
store some the ordpaths in the PUL, so the problem should not exist anymore.


> 
> 
> 
> > >
> > > Also, look at the following rewrite of the ancestor-of function. Do you
> > agree
> > > with it?
> > >
> > > (:~
> > >  : Determines whether the node position that is given as second argument
> is
> > >  : an ancestor of the node position is given as first argument.
> > >  :
> > >  : If the two positions were obtained within the same snapshot S, then the
> > >  : result of the function applies to the corresponding nodes as well, that
> > >  : is, within snapshot S, the second node is an ancestor of the first.
> > >  : Otherwise, the result of the function does not imply anything about the
> > >  : positional relationship of the two nodes.
> > >  :
> > >  : @param $pos1 the potential descendant node position
> > >  : @param $pos2 the potential ancestor node position
> > >  :
> > >  : @return true if the node position $pos2 is an ancestor of the node
> > position
> > >  : $pos1; false otherwise.
> > >  :
> > >  : @error zerr:ZAPI0028 if one of the given URI is not a valid node
> > >  : position computed by the np:node-position function.
> > >  :)
> > > declare function np:ancestor-of(
> > >   $pos1 as xs:anyURI,
> > >   $pos2 as xs:anyURI) as xs:boolean external;
> >
> > Yes, I agree with it. When I wrote this I was a little scared to say that a
> > structural relationship was ancestor of another, but now that they are
> called
> > node positions it should be ok. I am doing it.
> >
> > Federico
-- 
https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structuralrelationships2 into lp:zorba

2011-10-24 Thread Federico Cavalieri
> Second, when you say that you rely on it, does it mean that you may need to
> compare 2 node positions that were obtained in different snapshots? And if so,
> do you expect that the result of such a comparison says anything about the
> positional relationship of the two corresponding nodes at any point in time?
> (in other words, is what I wrote for the is-ancestor function really correct?)


What you write for the ancestor function (which i copied also in the other 
functions)
is correct although, given the current implementation, extra information would 
be present.

For the sake of curiosity i tried to write the most precise definition 
possible, 
but I don't think that putting this into the methods comment would be an 
improvement:

The result of the function applies to the corresponding nodes as well, 
in each snapshot S in which they belong to the same tree in which they 
belonged when the node position was computed. 

Follow/preceed in document order would be:
If the two positions correspond to sibling text nodes and both 
positions were obtained in the same snapshot, then the function also applies
in each snapshot S in which they belong to the same tree in which they 
belonged when the node position was computed. 

If the two positions correspond to sibling text nodes and the two 
positions were obtained in different snapshots, then it is impossible to 
determine
if the node corresponding to the first position is a predecessor of the node 
corresponding to the second position.

In all other cases, the result of the function applies to the corresponding 
nodes as well, in each snapshot S in which they belong to the same tree and 
collection in which they belonged when the node position was computed.

Cheers,
Federico
-- 
https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug_872732 into lp:zorba

2011-10-24 Thread Matthias Brantner
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug_872732 into lp:zorba

2011-10-24 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/bug_872732 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug_872732 into lp:zorba

2011-10-24 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug_872732-2011-10-24T14-47-03.751Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug_872732 into lp:zorba

2011-10-24 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/bug_872732 into lp:zorba failed. 
Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:272 
(message):
  Validation queue job bug_872732-2011-10-24T14-47-03.751Z is finished.  The
  final status was:

  

  1 tests did not succeed - changes not commited.


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

-- 
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug_872732 into lp:zorba

2011-10-24 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug_872732 into lp:zorba has been 
updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~matthias-brantner/zorba/data-cleaning into lp:zorba/data-cleaning-module

2011-10-24 Thread Bruno Martins
The proposal to merge lp:~matthias-brantner/zorba/data-cleaning into 
lp:zorba/data-cleaning-module has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~matthias-brantner/zorba/data-cleaning/+merge/79759
-- 
https://code.launchpad.net/~matthias-brantner/zorba/data-cleaning/+merge/79759
Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module.

-- 
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


[Zorba-coders] [Merge] lp:~matthias-brantner/zorba/data-cleaning into lp:zorba/data-cleaning-module

2011-10-24 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/data-cleaning-2011-10-24T15-26-35.344Z/log.html
-- 
https://code.launchpad.net/~matthias-brantner/zorba/data-cleaning/+merge/79759
Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module.

-- 
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


[Zorba-coders] [Merge] lp:~matthias-brantner/zorba/data-cleaning into lp:zorba/data-cleaning-module

2011-10-24 Thread Zorba Build Bot
Validation queue job data-cleaning-2011-10-24T15-26-35.344Z is finished. The 
final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~matthias-brantner/zorba/data-cleaning/+merge/79759
Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module.

-- 
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


Re: [Zorba-coders] [Merge] lp:~matthias-brantner/zorba/data-cleaning into lp:zorba/data-cleaning-module

2011-10-24 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. 
Got: 1 Approve, 1 Pending.
-- 
https://code.launchpad.net/~matthias-brantner/zorba/data-cleaning/+merge/79759
Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module.

-- 
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


[Zorba-coders] [Merge] lp:~matthias-brantner/zorba/data-cleaning into lp:zorba/data-cleaning-module

2011-10-24 Thread Zorba Build Bot
The proposal to merge lp:~matthias-brantner/zorba/data-cleaning into 
lp:zorba/data-cleaning-module has been updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~matthias-brantner/zorba/data-cleaning/+merge/79759
-- 
https://code.launchpad.net/~matthias-brantner/zorba/data-cleaning/+merge/79759
Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module.

-- 
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


Re: [Zorba-coders] [Merge] lp:~diogo-simoes89/zorba/data-cleaning into lp:zorba/data-cleaning-module

2011-10-24 Thread Bruno Martins
Review: Needs Fixing

Some minor things that should be changed before approving the merge:

* The documentation for functions like conversion:address-from-phone, 
conversion:user-from-phone and conversion:address-from-user should be revised, 
in order to keep just one example (i.e., the one from @example).

* The documentation for functions like normalization:to-date or 
normalization:to-time should present an example invocation.

* The documentation for the private functions like normalization:check-time 
should also provide an example invocation. From looking at the source code, it 
seems to me that these functions are not really necessary, and the 
corresponding instructions could instead be used directly in the code that
invokes these functions.
-- 
https://code.launchpad.net/~diogo-simoes89/zorba/data-cleaning/+merge/79530
Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module.

-- 
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-24 Thread Juan Zacarias
Hi markos,

So I made some changes to do what you told me to, but have some problems 
checking if it works, since a simple case of just using an external variable 
like 

declare $a external;
$a

works correctly, but in all my examples theCompilerCB->theSctxMap has just 1 
Sctx in the map, so I tried to make a test module which uses an external 
variable and a function to return it, and used it in the query to see if that 
way I can get 2 queries, but I get an error of the external variable in the 
module, the error says "var": not in library namespace.

So I am wondering if this is the wrong way to test it, or if you could point me 
to an example where this having several static contexts with external variables 
in the map happen.

Thanks
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug_872732 into lp:zorba

2011-10-24 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/bug_872732 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug_872732 into lp:zorba

2011-10-24 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug_872732-2011-10-24T19-04-02.134Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug_872732 into lp:zorba

2011-10-24 Thread Zorba Build Bot
Validation queue job bug_872732-2011-10-24T19-04-02.134Z is finished. The final 
status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug_872732 into lp:zorba

2011-10-24 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/bug_872732 into lp:zorba has been 
updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug_872732/+merge/79272
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/conformance_reports_generation into lp:zorba

2011-10-24 Thread Sorin Marian Nasoi
Sorin Marian Nasoi has proposed merging 
lp:~zorba-coders/zorba/conformance_reports_generation into lp:zorba.

Requested reviews:
  Chris Hillery (ceejatec)

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

Added testdriver_mt as a option for generating the w3c_testsuite results for 
W3C.
Also the tests are sorted by name in the XML conformance results in order to 
make the diffs more readable.
-- 
https://code.launchpad.net/~zorba-coders/zorba/conformance_reports_generation/+merge/80290
Your team Zorba Coders is subscribed to branch lp:zorba.
-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/conformance_reports_generation into lp:zorba

2011-10-24 Thread Sorin Marian Nasoi
Sorin Marian Nasoi has proposed merging 
lp:~zorba-coders/zorba/conformance_reports_generation into lp:zorba.

Requested reviews:
  Chris Hillery (ceejatec)

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

Added testdriver_mt as a option for generating the w3c_testsuite results for 
W3C.
Also the tests are sorted by name in the XML conformance results in order to 
make the diffs more readable.
-- 
https://code.launchpad.net/~zorba-coders/zorba/conformance_reports_generation/+merge/80291
Your team Zorba Coders is subscribed to branch lp:zorba.
-- 
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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/conformance_reports_generation into lp:zorba

2011-10-24 Thread Sorin Marian Nasoi
Sorin Marian Nasoi has proposed merging 
lp:~zorba-coders/zorba/conformance_reports_generation into lp:zorba.

Requested reviews:
  Chris Hillery (ceejatec)

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

Added testdriver_mt as a option for generating the w3c_testsuite results for 
W3C.
Also the tests are sorted by name in the XML conformance results in order to 
make the diffs more readable.
-- 
https://code.launchpad.net/~zorba-coders/zorba/conformance_reports_generation/+merge/80294
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'test/rbkt/Scripts/w3c/Readme.txt'
--- test/rbkt/Scripts/w3c/Readme.txt	2011-07-29 21:49:28 +
+++ test/rbkt/Scripts/w3c/Readme.txt	2011-10-25 06:13:08 +
@@ -14,19 +14,28 @@
 #
 To generate a report for submitting to the W3C:
 
-0.  For submitting reports to W3C one should compile Zorba with ZORBA_WITH_BIG_INTEGER=ON. 
-In order to generate the report for XQueryX compile Zorba by setting:
-ZORBA_XQUERYX=ON and ZORBA_TEST_XQUERYX=ON. These options are set to OFF by default.
+0.  For submitting reports to W3C one should compile Zorba with:
+ZORBA_WITH_BIG_INTEGER=ON
+ZORBA_XQUERYX=ON
+ZORBA_TEST_XQUERYX=ON
+All these options are set to OFF by default.
 
 1.  Import XQTS/XQFTTS.
 
-2.  Run a CTest dashboard from your build directory:
+2.  Use the "testdriver" to do the testing.
+Run a CTest dashboard from your build directory:
 
-ctest -T test -R w3c_testsuite/XQuery 
+ctest -T test -R w3c_testsuite/XQuery or
 ctest -T test -R w3c_testsuite/XQueryX
-ctest -T test -R w3c_full_text_testsuite/XQuery
+ctest -T test -R w3c_full_text_testsuite/XQuery or
 ctest -T test -R w3c_full_text_testsuite/XQueryX
 
+or, *ONLY* for XQTS you can use the "testdriver_mt" to do the testing:
+
+from the build/test/rbkt execute
+./testdriver_mt -b w3c_testsuite/XQuery -w3c or
+./testdriver_mt -b w3c_testsuite/XQueryX -w3c
+
 3.  From this directory (test/rbkt/Scripts/w3c), modify
 generate-submission-xqts.xq/generate-submission-xqftts.xq to reflect:
 

=== modified file 'test/rbkt/Scripts/w3c/Submit_xqts.cmake'
--- test/rbkt/Scripts/w3c/Submit_xqts.cmake	2011-07-29 06:36:14 +
+++ test/rbkt/Scripts/w3c/Submit_xqts.cmake	2011-10-25 06:13:08 +
@@ -25,12 +25,30 @@
   message (FATAL_ERROR "Zorba is required; not found. Specify -DZORBA_BUILD_DIR to point to your build directory if necessary.")
 endif ()
 
-# Read most recent CTest tag
-file (STRINGS "${builddir}/Testing/TAG" _tag_content)
-list (GET _tag_content 0 ctest_tag)
-set (testfile "${builddir}/Testing/${ctest_tag}/Test.xml")
-
-# Execute Zorba
-execute_process (COMMAND "${zorba}" --omit-xml-declaration --indent
- --query "${cwd}/generate-submission-xqts.xq" --as-files
- -e "ctests=${testfile}")
+find_program(testdriver_mt NAMES testdriver_mt PATHS "${builddir}" "${builddir}/release" PATH_SUFFIXES test/rbkt)
+if (testdriver_mt)
+  # Use the Test.xml generated by the testdriver_mt
+  set (testfile "${builddir}/Testing/Test.xml")
+  
+  if(testfile)
+# Execute Zorba
+execute_process (COMMAND "${zorba}" --omit-xml-declaration --indent
+--query "${cwd}/generate-submission-xqts.xq" --as-files
+-e "ctests=${testfile}")
+  else()
+message (FATAL_ERROR "Testdriver_mt was found, but ${builddir}/Testing/Test.xml was not found: please run 'testdriver_mt -b w3c_testsuite -w3c' in order to generate the 'Test.xml' report first.")
+  endif ()
+
+else ()
+  # Read most recent CTest tag and find out the corresponding Test.xml
+  file (STRINGS "${builddir}/Testing/TAG" _tag_content)
+  list (GET _tag_content 0 ctest_tag)
+  set (testfile "${builddir}/Testing/${ctest_tag}/Test.xml")
+  # MESSAGE(STATUS "using testresults from: ${testfile}")
+  
+  # Execute Zorba
+  execute_process (COMMAND "${zorba}" --omit-xml-declaration --indent
+  --query "${cwd}/generate-submission-xqts.xq" --as-files
+  -e "ctests=${testfile}")
+
+endif ()

=== modified file 'test/rbkt/Scripts/w3c/generate-submission-xqftts.xq'
--- test/rbkt/Scripts/w3c/generate-submission-xqftts.xq	2011-10-07 08:28:43 +
+++ test/rbkt/Scripts/w3c/generate-submission-xqftts.xq	2011-10-25 06:13:08 +
@@ -72,6 +72,7 @@
 {
   for $test in $ctests/*:Site/*:Testing/*:Test
   let $testname := fn:tokenize(fn:data($test/*:Name), "/")[last()]
+  order by $testname
   return
   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -229,7 +229,7 @@
 
 /***
   Create all the directories in a filepath, if thehy don't e

[Zorba-coders] [Merge] lp:~zorba-coders/zorba/conformance_reports_generation into lp:zorba

2011-10-24 Thread Sorin Marian Nasoi
Sorin Marian Nasoi has proposed merging 
lp:~zorba-coders/zorba/conformance_reports_generation into lp:zorba.

Requested reviews:
  Chris Hillery (ceejatec)

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

Added testdriver_mt as a option for generating the w3c_testsuite results for 
W3C.
Also the tests are sorted by name in the XML conformance results in order to 
make the diffs more readable.
-- 
https://code.launchpad.net/~zorba-coders/zorba/conformance_reports_generation/+merge/80297
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'test/rbkt/Scripts/w3c/Readme.txt'
--- test/rbkt/Scripts/w3c/Readme.txt	2011-07-29 21:49:28 +
+++ test/rbkt/Scripts/w3c/Readme.txt	2011-10-25 06:33:27 +
@@ -14,19 +14,28 @@
 #
 To generate a report for submitting to the W3C:
 
-0.  For submitting reports to W3C one should compile Zorba with ZORBA_WITH_BIG_INTEGER=ON. 
-In order to generate the report for XQueryX compile Zorba by setting:
-ZORBA_XQUERYX=ON and ZORBA_TEST_XQUERYX=ON. These options are set to OFF by default.
+0.  For submitting reports to W3C one should compile Zorba with:
+ZORBA_WITH_BIG_INTEGER=ON
+ZORBA_XQUERYX=ON
+ZORBA_TEST_XQUERYX=ON
+All these options are set to OFF by default.
 
 1.  Import XQTS/XQFTTS.
 
-2.  Run a CTest dashboard from your build directory:
+2.  Use the "testdriver" to do the testing.
+Run a CTest dashboard from your build directory:
 
-ctest -T test -R w3c_testsuite/XQuery 
+ctest -T test -R w3c_testsuite/XQuery or
 ctest -T test -R w3c_testsuite/XQueryX
-ctest -T test -R w3c_full_text_testsuite/XQuery
+ctest -T test -R w3c_full_text_testsuite/XQuery or
 ctest -T test -R w3c_full_text_testsuite/XQueryX
 
+or, *ONLY* for XQTS you can use the "testdriver_mt" to do the testing:
+
+from the build/test/rbkt execute
+./testdriver_mt -b w3c_testsuite/XQuery -w3c or
+./testdriver_mt -b w3c_testsuite/XQueryX -w3c
+
 3.  From this directory (test/rbkt/Scripts/w3c), modify
 generate-submission-xqts.xq/generate-submission-xqftts.xq to reflect:
 

=== modified file 'test/rbkt/Scripts/w3c/Submit_xqts.cmake'
--- test/rbkt/Scripts/w3c/Submit_xqts.cmake	2011-07-29 06:36:14 +
+++ test/rbkt/Scripts/w3c/Submit_xqts.cmake	2011-10-25 06:33:27 +
@@ -25,12 +25,30 @@
   message (FATAL_ERROR "Zorba is required; not found. Specify -DZORBA_BUILD_DIR to point to your build directory if necessary.")
 endif ()
 
-# Read most recent CTest tag
-file (STRINGS "${builddir}/Testing/TAG" _tag_content)
-list (GET _tag_content 0 ctest_tag)
-set (testfile "${builddir}/Testing/${ctest_tag}/Test.xml")
-
-# Execute Zorba
-execute_process (COMMAND "${zorba}" --omit-xml-declaration --indent
- --query "${cwd}/generate-submission-xqts.xq" --as-files
- -e "ctests=${testfile}")
+find_program(testdriver_mt NAMES testdriver_mt PATHS "${builddir}" "${builddir}/release" PATH_SUFFIXES test/rbkt)
+if (testdriver_mt)
+  # Use the Test.xml generated by the testdriver_mt
+  set (testfile "${builddir}/Testing/Test.xml")
+  
+  if(testfile)
+# Execute Zorba
+execute_process (COMMAND "${zorba}" --omit-xml-declaration --indent
+--query "${cwd}/generate-submission-xqts.xq" --as-files
+-e "ctests=${testfile}")
+  else()
+message (FATAL_ERROR "Testdriver_mt was found, but ${builddir}/Testing/Test.xml was not found: please run 'testdriver_mt -b w3c_testsuite -w3c' in order to generate the 'Test.xml' report first.")
+  endif ()
+
+else ()
+  # Read most recent CTest tag and find out the corresponding Test.xml
+  file (STRINGS "${builddir}/Testing/TAG" _tag_content)
+  list (GET _tag_content 0 ctest_tag)
+  set (testfile "${builddir}/Testing/${ctest_tag}/Test.xml")
+  # MESSAGE(STATUS "using testresults from: ${testfile}")
+  
+  # Execute Zorba
+  execute_process (COMMAND "${zorba}" --omit-xml-declaration --indent
+  --query "${cwd}/generate-submission-xqts.xq" --as-files
+  -e "ctests=${testfile}")
+
+endif ()

=== modified file 'test/rbkt/Scripts/w3c/generate-submission-xqftts.xq'
--- test/rbkt/Scripts/w3c/generate-submission-xqftts.xq	2011-10-07 08:28:43 +
+++ test/rbkt/Scripts/w3c/generate-submission-xqftts.xq	2011-10-25 06:33:27 +
@@ -72,6 +72,7 @@
 {
   for $test in $ctests/*:Site/*:Testing/*:Test
   let $testname := fn:tokenize(fn:data($test/*:Name), "/")[last()]
+  order by $testname
   return
   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -229,7 +229,7 @@
 
 /***
   Create all the directories in a filepath, if thehy don't e

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/conformance_reports_generation into lp:zorba

2011-10-24 Thread Chris Hillery
1. It looks like your editor is still randomly changing whitespace on certain 
lines, resulting in extraneous diffs... I hope you can figure out what's 
causing that and disable it.


2. In testdriver_mt, would it be possible to create the XML results on-disk as 
you go, rather than collecting the results in a huge in-memory stringstream?


3. One problem in Submit_xqts.cmake: you have

  set (testfile "${builddir}/Testing/Test.xml")
  if(testfile)
 ...

That will always be true. I think you meant

  if (EXISTS "${testfile}")


4. I also don't like that you had to duplicate the execute_process() call to 
Zorba. Couldn't you just set(testfile) in both branches of the "if 
(testdriver_mt)", and then move the execute_process() call after the endif()? 
Since you have a FATAL_ERROR if the Test.xml file isn't found, you don't have 
to worry about testfile being set to something bogus.

-- 
https://code.launchpad.net/~zorba-coders/zorba/conformance_reports_generation/+merge/80297
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
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