You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ma...@apache.org on 2005/11/10 14:34:28 UTC
svn commit: r332292 - in /xmlgraphics/fop/trunk: ./
test/java/org/apache/fop/layoutengine/
test/layoutengine/hyphenation-testcases/ test/layoutengine/testcases/
Author: manuel
Date: Thu Nov 10 05:34:17 2005
New Revision: 332292
URL: http://svn.apache.org/viewcvs?rev=332292&view=rev
Log:
Separated JUnit layout tests such that the majority are still run even if no hyphenation support present
Added:
xmlgraphics/fop/trunk/test/layoutengine/hyphenation-testcases/
xmlgraphics/fop/trunk/test/layoutengine/hyphenation-testcases/inline_border_padding_hyphenate.xml
- copied unchanged from r332015, xmlgraphics/fop/trunk/test/layoutengine/testcases/inline_border_padding_hyphenate.xml
xmlgraphics/fop/trunk/test/layoutengine/hyphenation-testcases/inline_border_padding_hyphenate_de.xml
- copied unchanged from r332015, xmlgraphics/fop/trunk/test/layoutengine/testcases/inline_border_padding_hyphenate_de.xml
Removed:
xmlgraphics/fop/trunk/test/layoutengine/testcases/
Modified:
xmlgraphics/fop/trunk/build.xml
xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java
Modified: xmlgraphics/fop/trunk/build.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/build.xml?rev=332292&r1=332291&r2=332292&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/build.xml (original)
+++ xmlgraphics/fop/trunk/build.xml Thu Nov 10 05:34:17 2005
@@ -614,7 +614,7 @@
<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"/>
<mkdir dir="${build.dir}/test-reports/fop-transcoder"/>
- <junit haltonerror="yes" fork="${junit.fork}">
+ <junit haltonerror="no" fork="${junit.fork}">
<sysproperty key="basedir" value="${basedir}"/>
<sysproperty key="jawa.awt.headless" value="true"/>
<formatter type="brief" usefile="false"/>
@@ -639,7 +639,7 @@
JAR needs to be updated.
-->
<mkdir dir="${build.dir}/test-reports/fop-transcoder-allinone"/>
- <junit haltonerror="yes" fork="${junit.fork}">
+ <junit haltonerror="no" fork="${junit.fork}" 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"/>
@@ -665,7 +665,7 @@
<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"/>
<mkdir dir="${build.dir}/test-reports/fop"/>
- <junit haltonerror="yes" fork="${junit.fork}">
+ <junit haltonerror="no" fork="${junit.fork}" 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"/>
@@ -695,7 +695,7 @@
<condition property="hyphenation.message" value="Hyphenation Support PRESENT">
<equals arg1="${hyphenation.present}" arg2="true"/>
</condition>
- <condition property="hyphenation.message" value="Hyphenation Support NOT Present - Some layout tests require hyphenation support">
+ <condition property="hyphenation.message" value="Hyphenation Support NOT Present - Layout tests which require hyphenation are NOT being run!">
<not>
<equals arg1="${hyphenation.present}" arg2="true"/>
</not>
@@ -703,13 +703,14 @@
<echo message="${hyphenation.message}"/>
</target>
- <target name="junit-layout" depends="hyphenation-present, junit-compile" description="Runs FOP's JUnit layout tests" if="hyphenation.present">
- <echo message="Running layout engine tests"/>
+ <target name="junit-layout-standard" depends="junit-compile" description="Runs FOP's standard JUnit layout tests">
+ <echo message="Running standard layout engine tests"/>
<mkdir dir="${build.dir}/test-reports/fop"/>
- <junit haltonerror="yes" fork="${junit.fork}">
+ <junit haltonerror="no" fork="${junit.fork}" 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"/>
<classpath>
<pathelement location="${build.dir}/test-classes"/>
@@ -723,9 +724,32 @@
</junit>
</target>
+ <target name="junit-layout-hyphenation" depends="hyphenation-present, junit-compile" description="Runs FOP's JUnit hyphenation layout tests" if="hyphenation.present">
+ <echo message="Running hyphenation layout engine tests"/>
+ <mkdir dir="${build.dir}/test-reports/fop"/>
+ <junit haltonerror="no" fork="${junit.fork}" 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"/>
+ <classpath>
+ <pathelement location="${build.dir}/test-classes"/>
+ <path refid="libs-run-classpath"/>
+ </classpath>
+ <batchtest todir="${build.dir}/test-reports/fop">
+ <fileset dir="${build.dir}/test-classes">
+ <include name="org/apache/fop/layoutengine/LayoutEngineTestSuite.class"/>
+ </fileset>
+ </batchtest>
+ </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 haltonerror="yes" fork="${junit.fork}">
+ <junit haltonerror="no" fork="${junit.fork}" 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}"/>
@@ -745,7 +769,25 @@
</junit>
</target>
- <target name="junit" depends="junit-basic, junit-transcoder, junit-layout, junit-fotree" description="Runs all of FOP's JUnit tests" if="junit.present" />
+ <target name="junit" depends="junit-basic, junit-transcoder, junit-layout, junit-fotree" 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>
+NOTE:
+**************************************************************************
+* One or more of the Junit tests had Failures or Errors or were skipped! *
+* Please check the output above for relevant messages. *
+**************************************************************************
+ </fail>
+ <echo>All Junit tests passed!</echo>
+ </target>
<!-- =================================================================== -->
<!-- Creates the API documentation -->
Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java?rev=332292&r1=332291&r2=332292&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java Thu Nov 10 05:34:17 2005
@@ -96,7 +96,11 @@
filter = new SuffixFileFilter(".xml");
filter = decorateWithDisabledList(filter);
}
- Collection files = FileUtils.listFiles(new File(mainDir, "testcases"),
+ String testset = System.getProperty("fop.layoutengine.testset");
+ if (testset == null) {
+ testset = "standard";
+ }
+ Collection files = FileUtils.listFiles(new File(mainDir, testset + "-testcases"),
filter, TrueFileFilter.INSTANCE);
String privateTests = System.getProperty("fop.layoutengine.private");
if ("true".equalsIgnoreCase(privateTests)) {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org