Changeset 11538


Ignore:
Timestamp:
01/04/09 12:33:37 (6 years ago)
Author:
mevenson
Message:

Added JUnit tests to Netbeans project.

Location:
trunk/abcl/nbproject
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/nbproject/build-impl.xml

    r11529 r11538  
    6565        </condition>
    6666        <condition property="have.tests">
    67             <or/>
     67            <or>
     68                <available file="${test.src.dir}"/>
     69            </or>
    6870        </condition>
    6971        <condition property="have.sources">
     
    124126    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
    125127        <fail unless="src.dir">Must set src.dir</fail>
     128        <fail unless="test.src.dir">Must set test.src.dir</fail>
    126129        <fail unless="build.dir">Must set build.dir</fail>
    127130        <fail unless="dist.dir">Must set dist.dir</fail>
     
    197200            <sequential>
    198201                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
    199                     <batchtest todir="${build.test.results.dir}"/>
     202                    <batchtest todir="${build.test.results.dir}">
     203                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
     204                            <filename name="@{testincludes}"/>
     205                        </fileset>
     206                    </batchtest>
    200207                    <classpath>
    201208                        <path path="${run.test.classpath}"/>
     
    502509    </target>
    503510    <target if="do.depend.true" name="-compile-test-depend">
    504         <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir=""/>
     511        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
    505512    </target>
    506513    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
    507         <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir=""/>
    508         <copy todir="${build.test.classes.dir}"/>
     514        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
     515        <copy todir="${build.test.classes.dir}">
     516            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
     517        </copy>
    509518    </target>
    510519    <target name="-post-compile-test">
     
    520529        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
    521530        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
    522         <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="" srcdir=""/>
    523         <copy todir="${build.test.classes.dir}"/>
     531        <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}"/>
     532        <copy todir="${build.test.classes.dir}">
     533            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
     534        </copy>
    524535    </target>
    525536    <target name="-post-compile-test-single">
  • trunk/abcl/nbproject/genfiles.properties

    r11529 r11538  
    44# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
    55# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
    6 nbproject/build-impl.xml.data.CRC32=71623fcd
    7 nbproject/build-impl.xml.script.CRC32=7d8238bd
     6nbproject/build-impl.xml.data.CRC32=742204ce
     7nbproject/build-impl.xml.script.CRC32=b94c76f8
    88nbproject/build-impl.xml.stylesheet.CRC32=e55b27f5
    99nbproject/profiler-build-impl.xml.data.CRC32=71623fcd
  • trunk/abcl/nbproject/project.properties

    r11537 r11538  
    6767src.doc.dir=doc
    6868src.themes.dir=themes
     69test.src.dir=test/src
  • trunk/abcl/nbproject/project.xml

    r11529 r11538  
    99                <root id="src.dir"/>
    1010            </source-roots>
    11             <test-roots/>
     11            <test-roots>
     12                <root id="test.src.dir" name="test/src"/>
     13            </test-roots>
    1214        </data>
    1315    </configuration>
Note: See TracChangeset for help on using the changeset viewer.