Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
171 lines (134 sloc) 5.18 KB
<?xml version="1.0"?>
<!--
Copyright (c) 2003 World Wide Web Consortium,
(Massachusetts Institute of Technology, Institut National de
Recherche en Informatique et en Automatique, Keio University). All
Rights Reserved. This program is distributed under the W3C's Software
Intellectual Property License. This program is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
See W3C License http://www.w3.org/Consortium/Legal/ for more details.
-->
<!--
$Log: clover.xml,v $
Revision 1.5 2004-01-05 08:27:14 dom-ts-4
XHTML compatible L3 Core tests (bug 455)
Revision 1.4 2003/12/22 17:39:46 dom-ts-4
Modified to use Xalan's XPath implementation (bug 397)
Revision 1.3 2003/12/06 06:50:29 dom-ts-4
More fixes for L&S (Bug 396)
Revision 1.2 2003/12/05 07:09:12 dom-ts-4
build.xml refactoring and L3 distributions (bug 398)
Revision 1.1 2003/12/02 04:08:22 dom-ts-4
Implementation coverage using clover (bug 397)
-->
<!--
This project instruments xercesImpl.jar using Clover
(http://www.thecortex.net/clover), runs DOM test suites and
generates a coverage report
-->
<project default="usage" basedir=".">
<property name="domts.build.dir" value="build"/>
<property name="domts.lib.dir" value="lib"/>
<property name="clover.build.dir" location="build/clover"/>
<property name="clover.jar" location="/clover-1.2/lib/clover.jar"/>
<property name="xerces.java.dir" location="../xerces/java"/>
<property name="xalan.java.dir" location="../xalan/java"/>
<property name="junit.jar" location="${domts.lib.dir}/junit.jar"/>
<taskdef classpath="${clover.jar}" resource="clovertasks"/>
<target name="with.clover">
<clover-setup initString="xercesImpl.db"/>
</target>
<target name="usage">
<echo message="common targets:"/>
</target>
<target name="init" depends="with.clover">
<mkdir dir="${clover.build.dir}/xerces"/>
</target>
<target name="clean">
<delete dir="${clover.build.dir}"/>
<delete file="xercesImpl.db"/>
</target>
<target name="instrument-xerces" depends="init">
<ant dir="${xerces.java.dir}" target="jar-dom3">
<property name="build.dir" location="${clover.build.dir}/xerces"/>
</ant>
<ant dir="${xerces.java.dir}" target="apijar-dom3">
<property name="build.dir" location="${clover.build.dir}/xerces"/>
</ant>
</target>
<target name="instrument-xalan" depends="init">
<ant dir="${xalan.java.dir}" target="jar">
<property name="build.dir" location="${clover.build.dir}/xalan"/>
</ant>
</target>
<target name="instrument" depends="instrument-xerces, instrument-xalan"/>
<target name="run-suite">
<java fork="true"
classname="${testclass}">
<classpath>
<pathelement location="${clover.build.dir}/xerces/dom3-xercesImpl.jar"/>
<pathelement location="${clover.build.dir}/xerces/dom3-xml-apis.jar"/>
<pathelement location="${clover.build.dir}/xalan/xalan.jar"/>
<pathelement location="${domts.build.dir}/junit-run.jar"/>
<pathelement location="${domts.build.dir}/${testjar}"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${clover.jar}"/>
</classpath>
</java>
</target>
<target name="dom1-core" depends="instrument">
<antcall target="run-suite">
<param name="testclass" value="org.w3c.domts.level1.core.alltests"/>
<param name="testjar" value="dom1-core.jar"/>
</antcall>
</target>
<target name="dom2-core" depends="instrument">
<antcall target="run-suite">
<param name="testclass" value="org.w3c.domts.level2.core.alltests"/>
<param name="testjar" value="dom2-core.jar"/>
</antcall>
</target>
<target name="dom2-events" depends="instrument">
<antcall target="run-suite">
<param name="testclass" value="org.w3c.domts.level2.events.alltests"/>
<param name="testjar" value="dom2-events.jar"/>
</antcall>
</target>
<target name="dom3-core" depends="instrument">
<antcall target="run-suite">
<param name="testclass" value="org.w3c.domts.level3.core.alltests"/>
<param name="testjar" value="dom3-core.jar"/>
</antcall>
</target>
<target name="dom3-ls" depends="instrument">
<antcall target="run-suite">
<param name="testclass" value="org.w3c.domts.level3.ls.alltests"/>
<param name="testjar" value="dom3-ls.jar"/>
</antcall>
</target>
<target name="dom3-xpath" depends="instrument">
<java fork="true" classname="junit.textui.TestRunner">
<arg value="org.w3c.domts.level3.xpath.TestXalan"/>
<classpath>
<pathelement location="${clover.build.dir}/xerces/dom3-xercesImpl.jar"/>
<pathelement location="${clover.build.dir}/xerces/dom3-xml-apis.jar"/>
<pathelement location="${clover.build.dir}/xalan/xalan.jar"/>
<pathelement location="${domts.build.dir}/junit-run.jar"/>
<pathelement location="${domts.build.dir}/dom3-xpath.jar"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${clover.jar}"/>
</classpath>
</java>
</target>
<target name="all-tests" depends="dom1-core, dom2-core, dom2-events"/>
<!-- target name="all-tests" depends="dom1-core, dom2-core, dom2-events, dom3-core, dom3-ls, dom3-xpath"/ -->
<target name="report" depends="init">
<clover-report>
<current title="DOM Test Suite coverage" outfile="${clover.build.dir}/report">
<format type="html"/>
</current>
</clover-report>
</target>
</project>