]> source.dussan.org Git - poi.git/commitdiff
build tweaks
authorAvik Sengupta <avik@apache.org>
Thu, 19 May 2005 12:03:41 +0000 (12:03 +0000)
committerAvik Sengupta <avik@apache.org>
Thu, 19 May 2005 12:03:41 +0000 (12:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353687 13f79535-47bb-0310-9956-ffa450edef68

build.xml

index 1094d976b1ebc1fadb049db43d821b931aae5160..53ed6e6c48c2aedbc6686ed053259cda3955a99e 100644 (file)
--- a/build.xml
+++ b/build.xml
 
       -Ddisconnected="true": Do not execute any targets that require an online
           connection to the Internet.
+      -Dtestcase=org.apache.poi.xxx.xxx : for the single-test target, specify
+             the test to run
 
       WARNING: This list is not exhaustive.
     </echo>
 
   <target name="test-main" unless="main.test.notRequired"
     depends="compile-main, -test-main-check, fail-unless-junit-is-available">
-    <junit fork="no" printsummary="no" haltonfailure="${halt.on.test.failure}"
+    <junit fork="no" printsummary="yes" haltonfailure="${halt.on.test.failure}"
       failureproperty="main.test.failed" showoutput="true">
       <classpath refid="test.classpath"/>
       <sysproperty key="HSSF.testdata.path"
         <junit printsummary="yes" showoutput="true" filtertrace="no" haltonfailure="false" >
             <classpath refid="test.classpath"/>
                  <classpath>
-                                <path refid="scratchpad.classpath"/>
+                                <path refid="test.classpath"/>
                                 <pathelement location="${main.output.dir}"/>
                                 <pathelement location="${scratchpad.output.dir}"/>
                                 <pathelement location="${scratchpad.output.test.dir}"/>
     </target>
 
     <target name="test-scratchpad" depends="compile-scratchpad,-test-scratchpad-check" unless="scratchpad.test.notRequired">
-        <junit printsummary="no" fork="no" haltonfailure="${halt.on.test.failure}" failureproperty="scratchpad.test.failed">
+        <junit printsummary="yes" fork="no" haltonfailure="${halt.on.test.failure}" failureproperty="scratchpad.test.failed">
             <classpath>
                 <path refid="scratchpad.classpath"/>
                 <pathelement location="${main.output.dir}"/>
         <echo file="${scratchpad.testokfile}" append="false" message="testok"/>
     </target>
 
+       <target name="single-scratchpad-test" depends="compile-scratchpad,-test-property-check" description="Runs a single test case specified with -Dtestcase=classname">
+               <junit printsummary="yes" showoutput="true" filtertrace="no" haltonfailure="false" >
+                   <classpath refid="test.classpath"/>
+                        <classpath>
+                                       <path refid="scratchpad.classpath"/>
+                                       <pathelement location="${main.output.dir}"/>
+                                       <pathelement location="${scratchpad.output.dir}"/>
+                                       <pathelement location="${scratchpad.output.test.dir}"/>
+                                       <pathelement location="${junit.jar1.dir}"/>
+                                   </classpath>
+                   <sysproperty key="HSSF.testdata.path" file="${scratchpad.src.test}/org/apache/poi/hssf/data"/>
+                   <sysproperty key="HPSF.testdata.path" file="${scratchpad.src.test}/org/apache/poi/hpsf/data"/>
+                   <sysproperty key="HWPF.testdata.path" file="${scratchpad.src.test}/org/apache/poi/hwpf/data"/>
+                   <sysproperty key="java.awt.headless" value="true"/>
+                       <sysproperty key="java.awt.headless" value="true"/>
+                   <formatter type="plain" usefile="no"/>
+                   <formatter type="xml"/>
+                   <test name="${testcase}"/>
+               </junit>
+           </target>
+       
     <target name="-test-contrib-check">
         <uptodate property="contrib.test.notRequired" targetfile="${contrib.testokfile}">
             <srcfiles dir="${contrib.src}"/>