Re: running fop tests
Re compilation errors: fop-1.0 is java 1.4 compliant and does not contain generics. The code below is not from fop-1.0. You can switch target version without harm. Re junit tests: ant junit runs many tests which are not related to fop.jar. Other jar files such as sandbox and transcoder are built, and irrelevant tests are run. The following tests are relevant to the functioning of fop.jar: junit-basic Runs FOP's JUnit basic tests junit-intermediate-format Runs FOP's intermediate format JUnit tests junit-layout-standard Runs FOP's standard JUnit layout tests junit-text-linebreakRuns FOP's JUnit unicode linebreak tests junit-userconfigRuns FOP's user config JUnit tests junit-area-tree-xml-format junit-render-pdf The following test is irrelevant: junit-transcoder The following test cannot be run without hyphenation patterns, and causes the junit target to report failure: junit-layout-hyphenation Note that only the target junit reports success or failure; other junit targets report success even if the test reports failure. One could construct a test junit-package which only includes tests relevant to fop.jar. ON this wiki page, http://wiki.apache.org/xmlgraphics-fop/HowTo/BuildFOPAlternatively, I describe a method to run some tests without ant, to avoid dependencies in the build file. But it includes only one target. Best, Simon On Fri, Sep 16, 2011 at 02:47:56PM +0200, Mathieu Malaterre wrote: > Hi Simon, > > On Mon, Aug 29, 2011 at 1:37 PM, Simon Pepping wrote: > > It would be good if alternative builds of fop would run a number of > > our junit tests. The fop team should look into this to formulate a > > recommendation. > > AFAIK running fop tests simply involved running the 'junit' ant target > ? Right ? In this case the code does not compile for me: > > [javac] > /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/util/text/LocatorFormatter.java > [javac] > /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:64: > generics are not supported in -source 1.4 > [javac] (use -source 5 or higher to enable generics) > [javac] private List charMetrics = new > java.util.ArrayList(); > [javac] ^ > [javac] > /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:418: > for-each loops are not supported in -source 1.4 > [javac] (use -source 5 or higher to enable for-each loops) > [javac] for (Map.Entry> > entryFrom : this.kerningMap.entrySet()) { > [javac] > ^ > [javac] > /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:500: > annotations are not supported in -source 1.4 > [javac] (use -source 5 or higher to enable annotations) > [javac] @Override > [javac] ^ > [javac] 3 errors > > > Can I switch the target version ? > > Thanks > -- > Mathieu > > - > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org > - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: running fop tests
I constructed an ant target junit-jar-main, which depends on a selection of junit tests which are relevant for fop.jar. I made the following modifications to the build file: Index: build.xml === --- build.xml (revision 963413) +++ build.xml (working copy) @@ -116,24 +116,36 @@ + - - - + + + + + + + + + + + - - - + + + + + + + + + - - - - + @@ -985,6 +997,18 @@ All Junit tests passed! Use the "junit-reports" target to generate HTML test reports + + +NOTE: +** +* One or more of the Junit tests had Failures or Errors or were skipped! * +* Please check the output above for relevant messages. * +*Or use the "junit-reports" target to generate HTML test reports.* +** + +All Junit tests for the main jar file passed! +Use the "junit-reports" target to generate HTML test reports + In the first part I modify the class paths, as described on the wiki page. In the second part I define a target junit-jar-main. I built fop.jar and ran the tests successfully in a fop source directory. Best, Simon On Sat, Sep 17, 2011 at 12:28:52PM +0200, Simon Pepping wrote: > Re junit tests: ant junit runs many tests which are not related to > fop.jar. Other jar files such as sandbox and transcoder are built, and > irrelevant tests are run. > > The following tests are relevant to the functioning of fop.jar: > > junit-basic Runs FOP's JUnit basic tests > junit-intermediate-format Runs FOP's intermediate format JUnit tests > junit-layout-standard Runs FOP's standard JUnit layout tests > junit-text-linebreakRuns FOP's JUnit unicode linebreak tests > junit-userconfigRuns FOP's user config JUnit tests > junit-area-tree-xml-format > junit-render-pdf > > The following test is irrelevant: > junit-transcoder > > The following test cannot be run without hyphenation patterns, and > causes the junit target to report failure: > junit-layout-hyphenation > > Note that only the target junit reports success or failure; other > junit targets report success even if the test reports failure. > > One could construct a test junit-package which only includes tests > relevant to fop.jar. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
running fop tests (Re: Building fop from source using qdox 1.11)
Hi Simon, On Mon, Aug 29, 2011 at 1:37 PM, Simon Pepping wrote: > It would be good if alternative builds of fop would run a number of > our junit tests. The fop team should look into this to formulate a > recommendation. AFAIK running fop tests simply involved running the 'junit' ant target ? Right ? In this case the code does not compile for me: [javac] /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/util/text/LocatorFormatter.java [javac] /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:64: generics are not supported in -source 1.4 [javac] (use -source 5 or higher to enable generics) [javac] private List charMetrics = new java.util.ArrayList(); [javac] ^ [javac] /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:418: for-each loops are not supported in -source 1.4 [javac] (use -source 5 or higher to enable for-each loops) [javac] for (Map.Entry> entryFrom : this.kerningMap.entrySet()) { [javac]^ [javac] /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:500: annotations are not supported in -source 1.4 [javac] (use -source 5 or higher to enable annotations) [javac] @Override [javac] ^ [javac] 3 errors Can I switch the target version ? Thanks -- Mathieu - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: running fop tests (Re: Building fop from source using qdox 1.11)
Hi Mathieu, It looks as if you're attempting to compile java with the Java 1.4 compiler. FOP no longer supports Java 1.4, but requires Java1.5+. Hope that helps Mehdi On 16 September 2011 13:47, Mathieu Malaterre wrote: > Hi Simon, > > On Mon, Aug 29, 2011 at 1:37 PM, Simon Pepping wrote: >> It would be good if alternative builds of fop would run a number of >> our junit tests. The fop team should look into this to formulate a >> recommendation. > > AFAIK running fop tests simply involved running the 'junit' ant target > ? Right ? In this case the code does not compile for me: > > [javac] > /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/util/text/LocatorFormatter.java > [javac] > /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:64: > generics are not supported in -source 1.4 > [javac] (use -source 5 or higher to enable generics) > [javac] private List charMetrics = new > java.util.ArrayList(); > [javac] ^ > [javac] > /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:418: > for-each loops are not supported in -source 1.4 > [javac] (use -source 5 or higher to enable for-each loops) > [javac] for (Map.Entry> > entryFrom : this.kerningMap.entrySet()) { > [javac] > ^ > [javac] > /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:500: > annotations are not supported in -source 1.4 > [javac] (use -source 5 or higher to enable annotations) > [javac] @Override > [javac] ^ > [javac] 3 errors > > > Can I switch the target version ? > > Thanks > -- > Mathieu > > - > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org > > - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org