Issue 63 in xspec: Using ANT to run multiple XSpec tests from same target runs out of memory

6 views
Skip to first unread message

xs...@googlecode.com

unread,
Oct 7, 2013, 11:50:57 AM10/7/13
to xspe...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 63 by neil.cro...@gmail.com: Using ANT to run multiple XSpec
tests from same target runs out of memory
http://code.google.com/p/xspec/issues/detail?id=63

If you run an ANT script which has a target that invokes multiple XSpec
tests, the system can rapidly run out of memory.

This appears to be an underly bug in the ANT xslt task used by XSpec. This
seems to hold on to memory at least until the entire target has completed.
Therefore if you are running many tests from one target memory can quickly
become exhausted.

A basic workaround would be to define an alternative to the "xslt" ANT task
by adding to the XSpec "build.xml" a new macrodef such as:

<macrodef name="AlternateXslt">
<attribute name="in"/>
<attribute name="out"/>
<attribute name="style"/>
<attribute name="classpath"/>
<sequential>
<java classpath="@{classpath}" classname="net.sf.saxon.Transform"
fork="true">
<arg value="-s:@{in}"/>
<arg value="-xsl:@{style}"/>
<arg value="-o:@{out}"/>
</java>
</sequential>
</macrodef>


Then replace the occurrences of the <xslt> task with <AlternativeXslt> e.g.

<AlternateXslt in="${xspec.xml}"
out="${xspec.xsl}"

style="${xspec.project.dir}/src/compiler/generate-xspec-tests.xsl"
classpath="${saxon.jar}"/>

and

<AlternateXslt in="${xspec.result.xml}"
out="${xspec.result.html}"

style="${xspec.project.dir}/src/reporter/format-xspec-report.xsl"
classpath="${saxon.jar}"/>


This solution relies on saxon being available as the XSLT processor.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages