diff options
author | Peter Hancock <phancock@apache.org> | 2011-10-19 10:21:17 +0000 |
---|---|---|
committer | Peter Hancock <phancock@apache.org> | 2011-10-19 10:21:17 +0000 |
commit | 9860d5a1338df6ad70e269d2423e7059c9194102 (patch) | |
tree | 569a87691daa0a460954e7dea5425c1fe5d9bc7a /build.xml | |
parent | 87f892d9d8b3e6459e19538156a70632a1bb4e6f (diff) | |
download | xmlgraphics-fop-9860d5a1338df6ad70e269d2423e7059c9194102.tar.gz xmlgraphics-fop-9860d5a1338df6ad70e269d2423e7059c9194102.zip |
Bugzilla#512010: Simplification of the build.
Reduced code duplication and layout engine tests.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1186070 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 234 |
1 files changed, 58 insertions, 176 deletions
@@ -186,10 +186,6 @@ list of possible build targets. <property name="build.viewer.images.dir" value="${build.classes.dir}/org/apache/fop/render/awt/viewer/images"/> <property name="build.property.examples.mime.type" value="application/pdf"/> <property name="build.property.tests.mime.type" value="application/pdf"/> -<!--property name="layoutengine.disabled" value="test/layoutengine/disabled-testcases.txt"/--> -<!--property name="fotree.disabled" value="test/fotree/disabled-testcases.txt"/--> - <property name="layoutengine.disabled" value="test/layoutengine/disabled-testcases.xml"/> - <property name="fotree.disabled" value="test/fotree/disabled-testcases.xml"/> <property name="dist.bin.dir" value="${basedir}/dist-bin"/> <property name="dist.src.dir" value="${basedir}/dist-src"/> <property name="nightly.dir" value="${basedir}/nightly"/> @@ -747,84 +743,34 @@ list of possible build targets. </target> <target name="junit-compile" depends="junit-compile-java, junit-compile-copy-resources" description="Compiles FOP's JUnit tests" if="junit.present"/> <target name="junit-transcoder" depends="junit-compile" description="Runs FOP's JUnit transcoder tests" if="junit.present"> - <echo message="Running basic functionality tests for fop-transcoder.jar"/> - <junit dir="${basedir}"> - <sysproperty key="basedir" value="${basedir}"/> - <sysproperty key="jawa.awt.headless" value="true"/> - <formatter type="brief" usefile="false"/> - <formatter type="plain" usefile="true"/> - <formatter type="xml" usefile="true"/> - <classpath> - <pathelement location="${build.dir}/test-classes"/> - <path refid="libs-build-classpath"/> - <fileset dir="${build.dir}"> - <include name="fop-transcoder.jar"/> - </fileset> - </classpath> - <test name="org.apache.fop.BasicTranscoderTestSuite" todir="${junit.reports.dir}" outfile="TEST-transcoder"/> - </junit> + <path id="transcoder-classpath"> + <pathelement location="${build.dir}/test-classes"/> + <path refid="libs-build-classpath"/> + <fileset dir="${build.dir}"> + <include name="fop-transcoder.jar"/> + </fileset> + </path> + <junit-run classpath="transcoder-classpath" title="basic functionality for fop-transcoder.jar" testsuite="org.apache.fop.BasicTranscoderTestSuite" outfile="TEST-transcoder"/> <echo message="Running basic functionality tests for fop-transcoder-allinone.jar"/> -<!-- These are the same tests as in the block above but testing the "allinone" JAR + <!-- These are the same tests as in the block above but testing the "allinone" JAR instead. Please don't add any additional paths other than the test classes, the allinone JAR and the any Batik JARs to the classpath. If this fails, but the previous test block succeeded it indicates that the packaging of the allinone JAR needs to be updated. --> - <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure"> - <sysproperty key="basedir" value="${basedir}"/> - <sysproperty key="jawa.awt.headless" value="true"/> - <formatter type="brief" usefile="false"/> - <formatter type="plain" usefile="true"/> - <formatter type="xml" usefile="true"/> - <classpath> - <pathelement location="${build.dir}/test-classes"/> - <path refid="libs-build-classpath"/> - <fileset dir="build"> - <include name="fop-transcoder-allinone.jar"/> - </fileset> - <fileset dir="${lib.dir}"> - <include name="xml-apis*.jar"/> - <include name="xerces*.jar"/> - <include name="batik*.jar"/> - </fileset> - </classpath> - <test name="org.apache.fop.BasicTranscoderTestSuite" todir="${junit.reports.dir}" outfile="TEST-transcoder-allinone"/> - </junit> - </target> - <target name="junit-userconfig" depends="junit-compile" if="junit.present" description="Runs FOP's user config JUnit tests"> - <echo message="Running user config tests"/> - <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure"> - <sysproperty key="basedir" value="${basedir}"/> - <sysproperty key="jawa.awt.headless" value="true"/> - <sysproperty key="fop.layoutengine.disabled" value="${layoutengine.disabled}"/> - <sysproperty key="fop.layoutengine.testset" value="standard"/> - <formatter type="brief" usefile="false"/> - <formatter type="plain" usefile="true"/> - <formatter type="xml" usefile="true"/> - <classpath> - <pathelement location="${build.dir}/test-classes"/> - <path refid="libs-run-classpath"/> - </classpath> - <test name="org.apache.fop.config.UserConfigTestSuite" todir="${junit.reports.dir}" outfile="TEST-userconfig"/> - </junit> - </target> - <target name="junit-basic" depends="junit-compile" description="Runs FOP's JUnit basic tests" if="junit.present"> - <echo message="Running basic functionality tests for fop.jar"/> - <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure"> - <sysproperty key="basedir" value="${basedir}"/> - <sysproperty key="jawa.awt.headless" value="true"/> - <formatter type="brief" usefile="false"/> - <formatter type="plain" usefile="true"/> - <formatter type="xml" usefile="true"/> - <classpath> - <pathelement location="${build.dir}/test-classes"/> - <path refid="libs-build-classpath"/> - <fileset dir="build"> - <include name="fop.jar"/> - </fileset> - </classpath> - <test name="org.apache.fop.StandardTestSuite" todir="${junit.reports.dir}"/> - </junit> + <path id="transcoder-all-classpath"> + <pathelement location="${build.dir}/test-classes"/> + <path refid="libs-build-classpath"/> + <fileset dir="build"> + <include name="fop-transcoder-allinone.jar"/> + </fileset> + <fileset dir="${lib.dir}"> + <include name="xml-apis*.jar"/> + <include name="xerces*.jar"/> + <include name="batik*.jar"/> + </fileset> + </path> + <junit-run classpath="transcoder-all-classpath" title="basic functionality for fop-transcoder-allinone.jar" testsuite="org.apache.fop.BasicTranscoderTestSuite" outfile="TEST-transcoder-allinone"/> </target> <target name="hyphenation-present" depends="junit-compile" if="junit.present"> <condition property="hyphenation.present"> @@ -844,132 +790,68 @@ list of possible build targets. </condition> <echo message="${hyphenation.message}"/> </target> - <target name="junit-layout-standard" depends="junit-compile, junit-fotree" if="junit.present" description="Runs FOP's standard JUnit layout tests"> - <echo message="Running standard layout engine tests"/> - <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure"> - <sysproperty key="basedir" value="${basedir}"/> - <sysproperty key="jawa.awt.headless" value="true"/> - <sysproperty key="fop.layoutengine.disabled" value="${layoutengine.disabled}"/> - <sysproperty key="fop.layoutengine.testset" value="standard"/> - <formatter type="brief" usefile="false"/> - <formatter type="plain" usefile="true"/> - <formatter type="xml" usefile="true"/> - <classpath> - <pathelement location="${build.dir}/test-classes"/> - <path refid="libs-run-classpath"/> - </classpath> - <test name="org.apache.fop.layoutengine.LayoutEngineTestSuite" todir="${junit.reports.dir}" outfile="TEST-layoutengine-standard"/> - </junit> - </target> - <target name="junit-layout-hyphenation" depends="hyphenation-present, junit-compile" if="hyphenation.present" description="Runs FOP's JUnit hyphenation layout tests"> - <echo message="Running hyphenation layout engine tests"/> - <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure"> - <sysproperty key="basedir" value="${basedir}"/> - <sysproperty key="jawa.awt.headless" value="true"/> - <sysproperty key="fop.layoutengine.disabled" value="${layoutengine.disabled}"/> - <sysproperty key="fop.layoutengine.testset" value="hyphenation"/> - <formatter type="brief" usefile="false"/> - <formatter type="plain" usefile="true"/> - <formatter type="xml" usefile="true"/> - <classpath> - <pathelement location="${build.dir}/test-classes"/> - <path refid="libs-run-classpath"/> - </classpath> - <test name="org.apache.fop.layoutengine.LayoutEngineTestSuite" todir="${junit.reports.dir}" outfile="TEST-layoutengine-hyphenation"/> - </junit> - </target> - <target name="junit-layout" depends="junit-layout-standard, junit-layout-hyphenation" description="Runs all FOP's JUnit layout tests"/> - <target name="junit-fotree" depends="junit-compile" description="Runs FOP's FO tree JUnit tests" if="junit.present"> - <echo message="Running fo tree tests"/> - <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure"> - <sysproperty key="basedir" value="${basedir}"/> - <sysproperty key="jawa.awt.headless" value="true"/> - <sysproperty key="fop.layoutengine.disabled" value="${fotree.disabled}"/> - <formatter type="brief" usefile="false"/> - <formatter type="plain" usefile="true"/> - <formatter type="xml" usefile="true"/> - <classpath> - <pathelement location="${build.dir}/test-classes"/> - <path refid="libs-build-classpath"/> - <fileset dir="build"> - <include name="fop.jar"/> - </fileset> - </classpath> - <test name="org.apache.fop.fotreetest.FOTreeTestSuite" todir="${junit.reports.dir}" outfile="TEST-FO-tree"/> - </junit> - </target> + <path id="standard-junit-classpath"> + <pathelement location="${build.dir}/test-classes"/> + <path refid="libs-tools-build-classpath"/> + <pathelement location="${build.dir}/fop.jar"/> + </path> <macrodef name="junit-run"> <attribute name="title"/> <attribute name="basedir" default=""/> <attribute name="testsuite"/> <attribute name="outfile"/> + <attribute name="classpath" default="standard-junit-classpath"/> <sequential> <echo message="Running @{title} tests..."/> <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure"> <sysproperty key="basedir" value="${basedir}/@{basedir}"/> <sysproperty key="jawa.awt.headless" value="true"/> - <sysproperty key="fop.layoutengine.disabled" value="${layoutengine.disabled}"/> - <sysproperty key="fop.layoutengine.testset" value="standard"/> <formatter type="brief" usefile="false"/> <formatter type="plain" usefile="true"/> <formatter type="xml" usefile="true"/> <classpath> - <pathelement location="${build.dir}/test-classes"/> - <path refid="libs-tools-build-classpath"/> - <pathelement location="${build.dir}/fop.jar"/> + <path refid="@{classpath}"/> </classpath> <test name="@{testsuite}" todir="${junit.reports.dir}" outfile="@{outfile}"/> </junit> </sequential> </macrodef> - <target name="junit-area-tree-xml-format" depends="junit-compile" - description="Runs FOP's area tree XML format JUnit tests" if="xmlunit.present"> - <junit-run title="area tree XML format" - testsuite="org.apache.fop.intermediate.AreaTreeXMLFormatTestSuite" - outfile="TEST-area-tree-xml-format"/> + <target name="junit-basic" depends="junit-compile" description="Runs FOP's JUnit basic tests" if="junit.present"> + <junit-run title="Standard test suite" testsuite="org.apache.fop.StandardTestSuite" outfile="TEST-standard-tests-suite"/> + </target> + <target name="junit-userconfig" depends="junit-compile" if="junit.present" description="Runs FOP's user config JUnit tests"> + <junit-run title="user config" testsuite="org.apache.fop.config.UserConfigTestSuite" outfile="TEST-userconfig"/> + </target> + <target name="junit-layout-standard" depends="junit-compile, junit-fotree" if="junit.present" description="Runs FOP's standard JUnit layout tests"> + <junit-run title="standard layout engine" testsuite="org.apache.fop.layoutengine.LayoutEngineTestSuite" outfile="TEST-layoutengine-standard"/> + </target> + <target name="junit-layout-hyphenation" depends="hyphenation-present, junit-compile" if="hyphenation.present" description="Runs FOP's JUnit hyphenation layout tests"> + <property name="fop.layoutengine.testset" value="hyphenation"/> + <junit-run title="hyphenation layout engine" testsuite="org.apache.fop.layoutengine.LayoutEngineTestSuite" outfile="TEST-layoutengine-hyphenation"/> + </target> + <target name="junit-layout" depends="junit-layout-standard, junit-layout-hyphenation" description="Runs all FOP's JUnit layout tests"/> + <target name="junit-fotree" depends="junit-compile" description="Runs FOP's FO tree JUnit tests" if="junit.present"> + <junit-run title="fo tree" testsuite="org.apache.fop.fotreetest.FOTreeTestSuite" outfile="TEST-FO-tree"/> + </target> + <target name="junit-area-tree-xml-format" depends="junit-compile" description="Runs FOP's area tree XML format JUnit tests" if="xmlunit.present"> + <junit-run title="area tree XML format" testsuite="org.apache.fop.intermediate.AreaTreeXMLFormatTestSuite" outfile="TEST-area-tree-xml-format"/> </target> <target name="junit-intermediate-layout" depends="junit-compile" if="xmlunit.present"> - <junit-run title="intermediate format from layout tests" - testsuite="org.apache.fop.intermediate.LayoutIFTestSuite" - outfile="TEST-intermediate-format-from-layout"/> - </target> - <target name="junit-intermediate-format" depends="junit-compile,junit-intermediate-layout" - description="Runs FOP's intermediate format JUnit tests" if="xmlunit.present"> - <junit-run title="intermediate format" - testsuite="org.apache.fop.intermediate.IntermediateFormatTestSuite" - outfile="TEST-intermediate-format"/> - </target> - <target name="junit-events" depends="junit-compile" - description="Runs FOP's event JUnit tests" if="junit.present"> - <junit-run title="event" basedir="test/events" - testsuite="org.apache.fop.events.EventProcessingTestCase" - outfile="TEST-events"/> + <junit-run title="intermediate format from layout tests" testsuite="org.apache.fop.intermediate.LayoutIFTestSuite" outfile="TEST-intermediate-format-from-layout"/> + </target> + <target name="junit-intermediate-format" depends="junit-compile,junit-intermediate-layout" description="Runs FOP's intermediate format JUnit tests" if="xmlunit.present"> + <junit-run title="intermediate format" testsuite="org.apache.fop.intermediate.IntermediateFormatTestSuite" outfile="TEST-intermediate-format"/> + </target> + <target name="junit-events" depends="junit-compile" description="Runs FOP's event JUnit tests" if="junit.present"> + <junit-run title="event" basedir="test/events" testsuite="org.apache.fop.events.EventProcessingTestCase" outfile="TEST-events"/> </target> <target name="junit-text-linebreak" depends="junit-compile" description="Runs FOP's JUnit unicode linebreak tests" if="junit.present"> - <echo message="Running tests for Unicode UAX#14 support"/> - <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure"> - <sysproperty key="basedir" value="${basedir}"/> - <sysproperty key="jawa.awt.headless" value="true"/> - <formatter type="brief" usefile="false"/> - <formatter type="plain" usefile="true"/> - <formatter type="xml" usefile="true"/> - <classpath> - <pathelement location="${build.dir}/test-classes"/> - <path refid="libs-build-classpath"/> - <fileset dir="build"> - <include name="fop.jar"/> - </fileset> - </classpath> - <test name="org.apache.fop.text.linebreak.LineBreakStatusTest" todir="${junit.reports.dir}"/> - </junit> + <junit-run title="Unicode UAX#14 support" testsuite="org.apache.fop.text.linebreak.LineBreakStatusTest" outfile="TEST-linebreak"/> </target> <target name="junit-render-pdf" depends="junit-compile"> - <echo message="Running tests for the render pdf package"/> - <junit-run title="render-pdf" testsuite="org.apache.fop.render.pdf.RenderPDFTestSuite" - outfile="TEST-render-pdf"/> + <junit-run title="render-pdf" testsuite="org.apache.fop.render.pdf.RenderPDFTestSuite" outfile="TEST-render-pdf"/> </target> - <target name="junit-reduced" depends="junit-userconfig, junit-basic, junit-transcoder, - junit-text-linebreak, junit-fotree, junit-render-pdf"/> + <target name="junit-reduced" depends="junit-userconfig, junit-basic, junit-transcoder, junit-text-linebreak, junit-fotree, junit-render-pdf"/> <target name="junit-full" depends="junit-reduced, junit-layout, junit-area-tree-xml-format, junit-intermediate-format"/> <target name="junit" depends="junit-full" description="Runs all of FOP's JUnit tests" if="junit.present"> <fail><condition><or><isset property="fop.junit.error"/><isset property="fop.junit.failure"/><not><isset property="hyphenation.present"/></not></or></condition> |