QT3 test suites

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

QT3 test suites

Florent Georges-3
  Hi,

  Is there any way to run a test suite in the QT3 format with Saxon?

  I am not interested in running the one QT3 test suite, but any other suite using the same format.

  Regards,


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: QT3 test suites

O'Neil Delpratt
Hi Florent,

Yes you can run a test suite with a QT3 format with Saxon. Since 9.6 we now ship the test driver in the release as a separate jar file. 

The source code for the test drivers are available in the resources file and on sourceforge for HE version.

Which version of Saxon are you using: HE, PE or EE?

For HE you can start by running the Test suite driver without any option to see what happens:

java -cp .:[working-directory-of-test-suite]:saxon9he.jar:saxon9-test.jar net.sf.saxon.testdriver.QT3TestDriverHE

You will get the message:

java com.saxonica.testdriver.FOTestSuiteDriver[HE] testsuiteDir catalog [-o:resultsdir] [-s:testSetName] [-t:testNamePattern] [-unfolded] [-bytecode:on|off|debug] [-tree] [-lang:XP20|XP30|XQ10|XQ30]


Please ignore the com.saxonica.testdriver.FOTestSuiteDriver[HE]” that is old. But what you see is the options available.

Example options:

java -cp /Users/ond1/qt3extra:saxon9he.jar:saxon9-test.jar net.sf.saxon.testdriver.QT3TestDriverHE /Users/ond1/qt3extra /Users/ond1/qt3extra/catalog.xml -o:/Users/ond1/qt3extra/results/saxon -lang:XQ30 -bytecode:on

For PE and EE call the class below:

com.saxonica.testdriver.QT3TestDriverPE

kind regards,

O'Neil

On 15 Jan 2015, at 00:29, Florent Georges <[hidden email]> wrote:

  Hi,

  Is there any way to run a test suite in the QT3 format with Saxon?

  I am not interested in running the one QT3 test suite, but any other suite using the same format.

  Regards,

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help

-------------------------------
O'Neil Delpratt
Software Developer, Saxonica Limited Email: [hidden email]
Tel: +44 118 946 5894
Web: http://www.saxonica.com
Saxonica Community site: http://dev.saxonica.com
Bug tracking site: https://saxonica.plan.io/




------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: QT3 test suites

Florent Georges-3
  Thank you, O'Neil! That's great news.

  I try to run the EXPath file test suite, from the CG Github repo:
https://github.com/expath/expath-cg/tree/master/tests/qt3/file.  So I
copied the file.xml catalog to the current directory, as well as
sandpit/, and created the directories results/ and work/.

  I tried the following command:

    java -cp .:xxx/saxon9he.jar:xxx/saxon9-test.jar \
        net.sf.saxon.testdriver.QT3TestDriverHE \
        work file.xml -o:results -lang:XP30

but Saxon replied that work/catalog.xml does not exist.  So I copied
file.xml to that position, and tried the command again.  Now Saxon
replied with a java.util.NoSuchElementException thrown in an iterator:
net.sf.saxon.s9api.XdmSequenceIterator.next(XdmSequenceIterator.java:94).

  So in summary, with the following directories and files, I get the
following error:

    file.xml
    sandpit/*
    results/
    work/
    -->
    Error on line 2 of file:/xxx/test/qt3/:
      FODC0002: I/O error reported by XML parser processing
      file:/xxx/test/qt3/work/catalog.xml:
      /xxx/test/qt3/work/catalog.xml (No such file or directory)

  And if I copy file.xml to work/catalog.xml:

    file.xml
    sandpit/*
    results/
    work/
       catalog.xml
    -->
    Caused by: java.util.NoSuchElementException
      at net.sf.saxon.s9api.XdmSequenceIterator.next(XdmSequenceIterator.java:94)
      at net.sf.saxon.testdriver.QT3TestReport.writeResultFilePreamble(QT3TestReport.java:29)
      at net.sf.saxon.testdriver.QT3TestDriverHE.writeResultFilePreamble(QT3TestDriverHE.java:634)
      at net.sf.saxon.testdriver.TestDriver.processCatalog(TestDriver.java:206)

  Full outputs for reference.  The first attempt:

java -cp .:xxx/saxon9he.jar:xxx/saxon9-test.jar \
    net.sf.saxon.testdriver.QT3TestDriverHE \
    work file.xml -o:results -lang:XP30
Testing Saxon-HE 9.6.0.3
Java version 1.7.0_45
UsingXslt30Transformer: true
Loading environment file
Error on line 2 of file:/xxx/test/qt3/:
  FODC0002: I/O error reported by XML parser processing
  file:/xxx/test/qt3/work/catalog.xml:
  /xxx/test/qt3/work/catalog.xml (No such file or directory)
Environment map errorI/O error reported by XML parser processing file:/xxx/test/qt3/work/catalog.xml: /xxx/test/qt3/work/catalog.xml (No such file or directory)
Exception in thread "main" java.lang.RuntimeException: java.util.NoSuchElementException
    at net.sf.saxon.testdriver.TestDriver.processCatalog(TestDriver.java:208)
    at net.sf.saxon.testdriver.TestDriver.go(TestDriver.java:144)
    at net.sf.saxon.testdriver.QT3TestDriverHE.go(QT3TestDriverHE.java:57)
    at net.sf.saxon.testdriver.QT3TestDriverHE.main(QT3TestDriverHE.java:86)
Caused by: java.util.NoSuchElementException
    at net.sf.saxon.s9api.XdmSequenceIterator.next(XdmSequenceIterator.java:94)
    at net.sf.saxon.testdriver.QT3TestReport.writeResultFilePreamble(QT3TestReport.java:29)
    at net.sf.saxon.testdriver.QT3TestDriverHE.writeResultFilePreamble(QT3TestDriverHE.java:634)
    at net.sf.saxon.testdriver.TestDriver.processCatalog(TestDriver.java:206)
    ... 3 more

  And the second one:

java -cp .:xxx/saxon9he.jar:xxx/saxon9-test.jar \
    net.sf.saxon.testdriver.QT3TestDriverHE \
    work file.xml -o:results -lang:XP30
Testing Saxon-HE 9.6.0.3
Java version 1.7.0_45
UsingXslt30Transformer: true
Loading environment file
Exception in thread "main" java.lang.RuntimeException: java.util.NoSuchElementException
    at net.sf.saxon.testdriver.TestDriver.processCatalog(TestDriver.java:208)
    at net.sf.saxon.testdriver.TestDriver.go(TestDriver.java:144)
    at net.sf.saxon.testdriver.QT3TestDriverHE.go(QT3TestDriverHE.java:57)
    at net.sf.saxon.testdriver.QT3TestDriverHE.main(QT3TestDriverHE.java:86)
Caused by: java.util.NoSuchElementException
    at net.sf.saxon.s9api.XdmSequenceIterator.next(XdmSequenceIterator.java:94)
    at net.sf.saxon.testdriver.QT3TestReport.writeResultFilePreamble(QT3TestReport.java:29)
    at net.sf.saxon.testdriver.QT3TestDriverHE.writeResultFilePreamble(QT3TestDriverHE.java:634)
    at net.sf.saxon.testdriver.TestDriver.processCatalog(TestDriver.java:206)
    ... 3 more

  Any idea what's going wrong?

  Regards,

--
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/


Le Jeudi 15 janvier 2015 11h12, O'Neil Delpratt <[hidden email]> a écrit :


Hi Florent,

Yes you can run a test suite with a QT3 format with Saxon. Since 9.6 we now ship the test driver in the release as a separate jar file. 

The source code for the test drivers are available in the resources file and on sourceforge for HE version.

Which version of Saxon are you using: HE, PE or EE?

For HE you can start by running the Test suite driver without any option to see what happens:

java -cp .:[working-directory-of-test-suite]:saxon9he.jar:saxon9-test.jar net.sf.saxon.testdriver.QT3TestDriverHE

You will get the message:

java com.saxonica.testdriver.FOTestSuiteDriver[HE] testsuiteDir catalog [-o:resultsdir] [-s:testSetName] [-t:testNamePattern] [-unfolded] [-bytecode:on|off|debug] [-tree] [-lang:XP20|XP30|XQ10|XQ30]


Please ignore the com.saxonica.testdriver.FOTestSuiteDriver[HE]” that is old. But what you see is the options available.

Example options:

java -cp /Users/ond1/qt3extra:saxon9he.jar:saxon9-test.jar net.sf.saxon.testdriver.QT3TestDriverHE /Users/ond1/qt3extra /Users/ond1/qt3extra/catalog.xml -o:/Users/ond1/qt3extra/results/saxon -lang:XQ30 -bytecode:on

For PE and EE call the class below:

com.saxonica.testdriver.QT3TestDriverPE

kind regards,

O'Neil

On 15 Jan 2015, at 00:29, Florent Georges <[hidden email]> wrote:

  Hi,

  Is there any way to run a test suite in the QT3 format with Saxon?

  I am not interested in running the one QT3 test suite, but any other suite using the same format.

  Regards,

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help

-------------------------------
O'Neil Delpratt
Software Developer, Saxonica Limited Email: [hidden email]
Tel: +44 118 946 5894
Web: http://www.saxonica.com
Saxonica Community site: http://dev.saxonica.com
Bug tracking site: https://saxonica.plan.io/






------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: QT3 test suites

John Lumley-2
On 15/01/2015 14:06, Florent Georges wrote:
  Thank you, O'Neil! That's great news.

  I try to run the EXPath file test suite, from the CG Github repo:
https://github.com/expath/expath-cg/tree/master/tests/qt3/file.  So I
copied the file.xml catalog to the current directory, as well as
sandpit/, and created the directories results/ and work/.

  I tried the following command:

    java -cp .:xxx/saxon9he.jar:xxx/saxon9-test.jar \
        net.sf.saxon.testdriver.QT3TestDriverHE \
        work file.xml -o:results -lang:XP30

but Saxon replied that work/catalog.xml does not exist.  So I copied
file.xml to that position, and tried the command again.  Now Saxon
replied with a java.util.NoSuchElementException thrown in an iterator:
net.sf.saxon.s9api.XdmSequenceIterator.next(XdmSequenceIterator.java:94).
file.xml isn't the master catalog, it's only the testcases for EXPath File. The catalog.xml file is used as the starting point and it has pointers to the appropriate test sets (e.g. <test-set name="expath-file"           file="file/file.xml"/> )
You can invoke the test-set by explicit name from the command line (-s:expath-file) such as

java -cp /Users/ond1/qt3extra:saxon9he.jar:saxon9-test.jar net.sf.saxon.testdriver.QT3TestDriverHE /Users/ond1/qt3extra /Users/ond1/qt3extra/catalog.xml -s:expath-file -o:/Users/ond1/qt3extra/results/saxon -lang:XQ30 -bytecode:on
In the absence of a specific test set, by default all the test-sets pointed to by the catalog are tested.

--
John Lumley MA PhD CEng FIEE
[hidden email]
on behalf of Saxonica Ltd

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: QT3 test suites

Florent Georges-3
  Thank you, John and Mike!

  Given your answers, I am not able to run the test suite.  I created
a catalog.xml file which is a real catalog, pointing to the test set
file.xml.  All the files are available on Github, in expath-file-java
repo at https://github.com/fgeorges/expath-file-java/.  The QT3 files
are in file-saxon/test-rsrc/qt3/ [1].

  I wrote my own driver class, extending the QT3TestDriverHE class, in
file-saxon/test/org/expath/file/saxon/qt3/Driver.java [2].  It calls
go() with specific arguments (so main() can be executed with no
arguments in this case).  It overrides getEnvironment() to register
extension functions to the Processor used to evaluate the test cases.

  Last question: is the driver expecting to be run with the current
directory (AKA "pwd" in Shell or "user.dir" in Java) equal to its
first parameter?  Because when it is not the case, it creates files in
the current directory.

  Regards,

[1]https://github.com/fgeorges/expath-file-java/tree/master/file-saxon/test-rsrc/qt3
[2]https://github.com/fgeorges/expath-file-java/blob/master/file-saxon/test/org/expath/file/saxon/qt3/Driver.java

--
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/


Le Jeudi 15 janvier 2015 16h32, John Lumley <[hidden email]> a écrit :


On 15/01/2015 14:06, Florent Georges wrote:
  Thank you, O'Neil! That's great news.

  I try to run the EXPath file test suite, from the CG Github repo:
https://github.com/expath/expath-cg/tree/master/tests/qt3/file.  So I
copied the file.xml catalog to the current directory, as well as
sandpit/, and created the directories results/ and work/.

  I tried the following command:

    java -cp .:xxx/saxon9he.jar:xxx/saxon9-test.jar \
        net.sf.saxon.testdriver.QT3TestDriverHE \
        work file.xml -o:results -lang:XP30

but Saxon replied that work/catalog.xml does not exist.  So I copied
file.xml to that position, and tried the command again.  Now Saxon
replied with a java.util.NoSuchElementException thrown in an iterator:
net.sf.saxon.s9api.XdmSequenceIterator.next(XdmSequenceIterator.java:94).
file.xml isn't the master catalog, it's only the testcases for EXPath File. The catalog.xml file is used as the starting point and it has pointers to the appropriate test sets (e.g. <test-set name="expath-file"           file="file/file.xml"/> )
You can invoke the test-set by explicit name from the command line (-s:expath-file) such as

java -cp /Users/ond1/qt3extra:saxon9he.jar:saxon9-test.jar net.sf.saxon.testdriver.QT3TestDriverHE /Users/ond1/qt3extra /Users/ond1/qt3extra/catalog.xml -s:expath-file -o:/Users/ond1/qt3extra/results/saxon -lang:XQ30 -bytecode:on
In the absence of a specific test set, by default all the test-sets pointed to by the catalog are tested.

--
John Lumley MA PhD CEng FIEE
[hidden email]
on behalf of Saxonica Ltd



------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: QT3 test suites

Michael Kay
>
>   Given your answers, I am not able to run the test suite.

I'm hoping "not" should read "now"? If not, tell us how it's failing!

>   Last question: is the driver expecting to be run with the current
> directory (AKA "pwd" in Shell or "user.dir" in Java) equal to its
> first parameter?  Because when it is not the case, it creates files in
> the current directory.
>

The expath file tests are unusual in that they have to create files as part of their job. These should all go in the "sandpit" directory.

Apart from that, the test driver creates reports of the results and it may save results from tests. These should all go in the directory identified by the -o option (-o:resultsDir). But I wouldn't guarantee it - as I mentioned, this software is not product-quality.

Michael Kay
Saxonica


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: QT3 test suites

Florent Georges-3
Michael Kay wrote:

> > Given your answers, I am not able to run the test suite.

> I'm hoping "not" should read "now"? If not, tell us how it's failing!

  Oops, indeed, I AM able to run it NOW.  Sorry for the typo.

> The expath file tests are unusual in that they have to create files
> as part of their job.  These should all go in the "sandpit"
> directory.

  After, a few tests, it seems the paths given to the file:* functions
creating files, are resolved against the current dir (where appears a
sandpit dir after running the test suite).  Hence the dependency on
the current dir in the driver.

  Changing the way I call the driver and be sure the current dir is
set to the work dir before solves the problem.

  Thank you!  Regards,

--
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/



------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: QT3 test suites

John Lumley-2
In reply to this post by Florent Georges-3
On 17/01/2015 16:42, Florent Georges wrote:
All the files are available on Github, in expath-file-java
repo at https://github.com/fgeorges/expath-file-java/.  The QT3 files
are in file-saxon/test-rsrc/qt3/ [1].
The QT3 test files are also in the EXPath Github at https://github.com/expath/expath-cg/tree/master/tests/qt3/file  These were the ones I updated (to test for blanks in file names last week!

John

--
John Lumley MA PhD CEng FIEE
[hidden email]
on behalf of Saxonica Ltd

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help