Postpone test failues, to first generate the pngs

This commit is contained in:
Erich Schubert 2018-10-27 14:04:13 +02:00
parent f1be5aaee8
commit 1e52483a86
1 changed files with 26 additions and 18 deletions

View File

@ -127,36 +127,44 @@ class Version { public static String VERSION = "${VERSION}";}
<target name="test" depends="compile,testcompile" <target name="test" depends="compile,testcompile"
description="run the regression tests" > description="run the regression tests" >
<java classname="org.umlgraph.test.BasicTest" fork="true" failonerror="true"> <!-- postpone failures, so we get to see the pngs -->
<classpath> <java classname="org.umlgraph.test.BasicTest" fork="true" resultproperty="BasicTest.exit">
<pathelement location="${env.JAVA_HOME}/lib/tools.jar"/> <classpath>
<pathelement location="${build}"/> <pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
<pathelement location="${lib}/UmlGraph.jar"/> <pathelement location="${build}"/>
</classpath> <pathelement location="${lib}/UmlGraph.jar"/>
</java> </classpath>
<java classname="org.umlgraph.test.UmlDocTest" fork="true" failonerror="true"> </java>
<classpath> <java classname="org.umlgraph.test.UmlDocTest" fork="true" resultproperty="UmlDocTest.exit">
<pathelement location="${env.JAVA_HOME}/lib/tools.jar"/> <classpath>
<pathelement location="${build}"/> <pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
<pathelement location="${lib}/UmlGraph.jar"/> <pathelement location="${build}"/>
</classpath> <pathelement location="${lib}/UmlGraph.jar"/>
</java> </classpath>
</java>
<apply executable="dot" dest="${testout}" parallel="false"> <apply executable="dot" dest="${testout}" parallel="false">
<arg value="-Tpng"/> <arg value="-Tpng"/>
<arg value="-o"/> <arg value="-o"/>
<targetfile/> <targetfile/>
<srcfile/> <srcfile/>
<fileset dir="${testout}" includes="*.dot"/> <fileset dir="${testout}" includes="*.dot"/>
<mapper type="glob" from="*.dot" to="*.png"/> <mapper type="glob" from="*.dot" to="*.png"/>
</apply> </apply>
<apply executable="dot" dest="${testref}" parallel="false"> <apply executable="dot" dest="${testref}" parallel="false">
<arg value="-Tpng"/> <arg value="-Tpng"/>
<arg value="-o"/> <arg value="-o"/>
<targetfile/> <targetfile/>
<srcfile/> <srcfile/>
<fileset dir="${testref}" includes="*.dot"/> <fileset dir="${testref}" includes="*.dot"/>
<mapper type="glob" from="*.dot" to="*.png"/> <mapper type="glob" from="*.dot" to="*.png"/>
</apply> </apply>
<!-- postponed failure, so we get to see the pngs -->
<fail message="BasicTest failed">
<condition><not><equals arg1="0" arg2="${BasicTest.exit}"/></not></condition>
</fail>
<fail message="UmlDocTest failed">
<condition><not><equals arg1="0" arg2="${UmlDocTest.exit}"/></not></condition>
</fail>
</target> </target>
<target name="javadocs" depends="compile"> <target name="javadocs" depends="compile">