Make the "tests" target actually work (and run the tests). But we'll not run

the tests on every "dist" build, we'll just stick with the current behavior of
only compiling the tests (to make sure they don't rot). In a better world
ooo-libs would have a testall target which runs the tests on all the projects
it builds, so that we actually got the benefit of the few unit tests we have.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@909 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Michael Bayne
2010-04-05 01:35:58 +00:00
parent 278696c655
commit 04f4488f55
2 changed files with 14 additions and 12 deletions
+8 -5
View File
@@ -177,16 +177,19 @@
</java> </java>
</target> </target>
<!-- builds the various tests --> <target name="tcompile" description="Builds (but does not run) the tests.">
<target name="tests"> <ant dir="tests" target="compile" inheritAll="false"/>
<ant dir="tests" target="compile"/> </target>
<target name="tests" description="Builds and runs the tests.">
<ant dir="tests" target="tests" inheritAll="false"/>
</target> </target>
<!-- a target for rebuilding everything --> <!-- a target for rebuilding everything -->
<target name="all" depends="clean,prepare,compile,ninstall,javadoc,tests,dist"/> <target name="all" depends="clean,prepare,compile,ninstall,tests,javadoc,dist"/>
<!-- builds our distribution files (war and jar) --> <!-- builds our distribution files (war and jar) -->
<target name="dist" depends="prepare,compile,procstream,ninstall,aslib,tests"> <target name="dist" depends="prepare,compile,tcompile,procstream,ninstall,aslib">
<!-- build our various jar files --> <!-- build our various jar files -->
<jar destfile="${deploy.dir}/${lib.name}-rsrc.jar"> <jar destfile="${deploy.dir}/${lib.name}-rsrc.jar">
<fileset dir="${classes.dir}" includes="com/threerings/resource/**"/> <fileset dir="${classes.dir}" includes="com/threerings/resource/**"/>
+6 -7
View File
@@ -5,12 +5,12 @@
<property name="junit.fork" value="true"/> <property name="junit.fork" value="true"/>
<!-- things you probably don't want to change --> <!-- things you probably don't want to change -->
<property name="test.dir" value="."/> <property name="test.dir" value="${basedir}"/>
<property name="src.dir" value="src/java"/> <property name="src.dir" value="src/java"/>
<property name="deploy.dir" value="dist"/> <property name="deploy.dir" value="dist"/>
<property name="cbundle.dir" value="rsrc/bundles/components"/> <property name="cbundle.dir" value="${basedir}/rsrc/bundles/components"/>
<property name="tbundle.dir" value="rsrc/bundles/tiles"/> <property name="tbundle.dir" value="${basedir}/rsrc/bundles/tiles"/>
<!-- import some targets to check dependency availability --> <!-- import some targets to check dependency availability -->
<import file="../etc/depends-incl.xml"/> <import file="../etc/depends-incl.xml"/>
@@ -143,12 +143,11 @@
classname="com.threerings.miso.tile.tools.CompileFringeConfigurationTask"/> classname="com.threerings.miso.tile.tools.CompileFringeConfigurationTask"/>
<conffringe <conffringe
tilesetmap="${tbundle.dir}/tilesets.map" tilesetmap="${tbundle.dir}/tilesets.map"
fringedef="rsrc/config/miso/tile/fringeconf.xml" fringedef="${basedir}/rsrc/config/miso/tile/fringeconf.xml"
target="rsrc/config/miso/tile/fringeconf.dat"/> target="${basedir}/rsrc/config/miso/tile/fringeconf.dat"/>
</target> </target>
<!-- run the tests --> <target name="tests" depends="compile,cbundles,tsbundles" description="Runs the tests.">
<target name="test" depends="compile,cbundles,tsbundles" description="Run the tests.">
<junit printsummary="no" haltonfailure="yes" fork="${junit.fork}"> <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
<classpath refid="classpath"/> <classpath refid="classpath"/>
<sysproperty key="test_dir" value="${test.dir}"/> <sysproperty key="test_dir" value="${test.dir}"/>