[armedbear-cvs] r11538 - trunk/abcl/nbproject

Mark Evenson mevenson at common-lisp.net
Sun Jan 4 12:33:37 UTC 2009


Author: mevenson
Date: Sun Jan  4 12:33:37 2009
New Revision: 11538

Log:
Added JUnit tests to Netbeans project.


Modified:
   trunk/abcl/nbproject/build-impl.xml
   trunk/abcl/nbproject/genfiles.properties
   trunk/abcl/nbproject/project.properties
   trunk/abcl/nbproject/project.xml

Modified: trunk/abcl/nbproject/build-impl.xml
==============================================================================
--- trunk/abcl/nbproject/build-impl.xml	(original)
+++ trunk/abcl/nbproject/build-impl.xml	Sun Jan  4 12:33:37 2009
@@ -64,7 +64,9 @@
             </and>
         </condition>
         <condition property="have.tests">
-            <or/>
+            <or>
+                <available file="${test.src.dir}"/>
+            </or>
         </condition>
         <condition property="have.sources">
             <or>
@@ -123,6 +125,7 @@
     </target>
     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
         <fail unless="src.dir">Must set src.dir</fail>
+        <fail unless="test.src.dir">Must set test.src.dir</fail>
         <fail unless="build.dir">Must set build.dir</fail>
         <fail unless="dist.dir">Must set dist.dir</fail>
         <fail unless="build.classes.dir">Must set build.classes.dir</fail>
@@ -196,7 +199,11 @@
             <attribute default="**" name="testincludes"/>
             <sequential>
                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
-                    <batchtest todir="${build.test.results.dir}"/>
+                    <batchtest todir="${build.test.results.dir}">
+                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
+                            <filename name="@{testincludes}"/>
+                        </fileset>
+                    </batchtest>
                     <classpath>
                         <path path="${run.test.classpath}"/>
                     </classpath>
@@ -501,11 +508,13 @@
         <!-- You can override this target in the ../build.xml file. -->
     </target>
     <target if="do.depend.true" name="-compile-test-depend">
-        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir=""/>
+        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
     </target>
     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
-        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir=""/>
-        <copy todir="${build.test.classes.dir}"/>
+        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
+        <copy todir="${build.test.classes.dir}">
+            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+        </copy>
     </target>
     <target name="-post-compile-test">
         <!-- Empty placeholder for easier customization. -->
@@ -519,8 +528,10 @@
     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
-        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="" srcdir=""/>
-        <copy todir="${build.test.classes.dir}"/>
+        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
+        <copy todir="${build.test.classes.dir}">
+            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+        </copy>
     </target>
     <target name="-post-compile-test-single">
         <!-- Empty placeholder for easier customization. -->

Modified: trunk/abcl/nbproject/genfiles.properties
==============================================================================
--- trunk/abcl/nbproject/genfiles.properties	(original)
+++ trunk/abcl/nbproject/genfiles.properties	Sun Jan  4 12:33:37 2009
@@ -3,8 +3,8 @@
 build.xml.stylesheet.CRC32=be360661
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=71623fcd
-nbproject/build-impl.xml.script.CRC32=7d8238bd
+nbproject/build-impl.xml.data.CRC32=742204ce
+nbproject/build-impl.xml.script.CRC32=b94c76f8
 nbproject/build-impl.xml.stylesheet.CRC32=e55b27f5
 nbproject/profiler-build-impl.xml.data.CRC32=71623fcd
 nbproject/profiler-build-impl.xml.script.CRC32=abda56ed

Modified: trunk/abcl/nbproject/project.properties
==============================================================================
--- trunk/abcl/nbproject/project.properties	(original)
+++ trunk/abcl/nbproject/project.properties	Sun Jan  4 12:33:37 2009
@@ -66,3 +66,4 @@
 src.dir=${file.reference.abcl-src}
 src.doc.dir=doc
 src.themes.dir=themes
+test.src.dir=test/src

Modified: trunk/abcl/nbproject/project.xml
==============================================================================
--- trunk/abcl/nbproject/project.xml	(original)
+++ trunk/abcl/nbproject/project.xml	Sun Jan  4 12:33:37 2009
@@ -8,7 +8,9 @@
             <source-roots>
                 <root id="src.dir"/>
             </source-roots>
-            <test-roots/>
+            <test-roots>
+                <root id="test.src.dir" name="test/src"/>
+            </test-roots>
         </data>
     </configuration>
 </project>




More information about the armedbear-cvs mailing list