Nixed remaining test cruft. Added "ant miso-viewer" target which runs the miso

scene viewer.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@1056 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Michael Bayne
2010-11-08 21:13:17 +00:00
parent b5a547edf9
commit 445b4d4dbd
2 changed files with 10 additions and 168 deletions
+10
View File
@@ -428,4 +428,14 @@
<delete dir="${deploy.dir}/snapshot"/> <delete dir="${deploy.dir}/snapshot"/>
</target> </target>
<property name="scene" value="idyll"/>
<target name="miso-viewer" depends="compile,test-tsbundles,test-cbundles"
description="Runs the Miso scene viewer.">
<java classname="com.threerings.miso.viewer.ViewerApp"
fork="true" classpathref="test.classpath">
<sysproperty key="resource_dir" value="${testrsrc.dir}"/>
<sysproperty key="no_unpack_resources" value="true"/>
<arg value="${testrsrc.dir}/scenes/${scene}.xml"/>
</java>
</target>
</project> </project>
-168
View File
@@ -1,168 +0,0 @@
<!-- build configuration -->
<project name="narya tests" default="compile" basedir=".">
<!-- things you may want to change -->
<property name="junit.fork" value="true"/>
<!-- things you probably don't want to change -->
<property name="test.dir" value="${basedir}"/>
<property name="src.dir" value="src/java"/>
<property name="deploy.dir" value="dist"/>
<property name="cbundle.dir" value="${basedir}/rsrc/bundles/components"/>
<property name="tbundle.dir" value="${basedir}/rsrc/bundles/tiles"/>
<!-- import some targets to check dependency availability -->
<import file="../etc/depends-incl.xml"/>
<!-- declare our classpath -->
<property name="classes.dir" value="${deploy.dir}/classes"/>
<property name="narya.classes.dir" value="../${deploy.dir}/classes"/>
<path id="classpath">
<pathelement location="${classes.dir}"/>
<pathelement location="${narya.classes.dir}"/>
<fileset dir="../${deploy.dir}/lib" includes="**/*.jar"/>
</path>
<!-- generates additional methods for distributed object classes -->
<target name="gendobj" depends="prepare">
<taskdef name="dobj" classname="com.threerings.presents.tools.GenDObjectTask"
classpathref="classpath"/>
<!-- make sure the dobject class files are all compiled -->
<javac srcdir="src/java" destdir="${classes.dir}" includeAntRuntime="false"
debug="on" optimize="${build.optimize}" deprecation="on" source="1.4" target="1.4">
<classpath refid="classpath"/>
<include name="**/*Object.java"/>
</javac>
<!-- now generate the associated files -->
<dobj classpathref="classpath">
<fileset dir="src/java" includes="**/*Object.java"/>
</dobj>
</target>
<!-- generates marshaller and dispatcher classes for all invocation service declarations -->
<target name="genservice">
<apply executable="../bin/genservice" failonerror="true" parallel="true">
<arg value="--classpath"/>
<arg value="${classes.dir}:${narya.classes.dir}"/>
<arg value="--sourcedir"/>
<arg value="src/java"/>
<fileset dir="src/java" includes="**/*Service.java"/>
</apply>
</target>
<!-- generates sender and decoder classes for all invocation receiver declarations -->
<target name="genreceiver">
<apply executable="../bin/genreceiver" failonerror="true" parallel="true">
<arg value="--classpath"/>
<arg value="${classes.dir}:${narya.classes.dir}"/>
<arg value="--sourcedir"/>
<arg value="src/java"/>
<fileset dir="src/java" includes="**/*Receiver.java"/>
</apply>
</target>
<!-- prepares the application directories -->
<target name="prepare">
<mkdir dir="${deploy.dir}"/>
<mkdir dir="${classes.dir}"/>
<copy todir="${classes.dir}">
<fileset dir="${src.dir}" includes="**/*.properties"/>
</copy>
<copy todir="${classes.dir}/rsrc">
<fileset dir="rsrc" includes="**/*"/>
</copy>
</target>
<!-- cleans out the installed application -->
<target name="clean">
<delete dir="${deploy.dir}"/>
<delete file="rsrc/bundles/tiles/tilesets.map"/>
<delete file="rsrc/bundles/components/components.map"/>
<delete file="rsrc/bundles/components/metadata.jar"/>
<delete><fileset dir="rsrc/bundles/tiles" includes="**/bundle.jar"/></delete>
<delete><fileset dir="rsrc/bundles/components" includes="**/components.jar"/></delete>
</target>
<!-- build the java class files -->
<target name="compile" depends="check-available,prepare">
<javac srcdir="${src.dir}" destdir="${classes.dir}" includeAntRuntime="false"
debug="on" optimize="off" deprecation="off">
<classpath refid="classpath"/>
<exclude name="com/threerings/openal/**" unless="build.openal"/>
<exclude name="com/threerings/**/tools/xml/**" unless="build.xml"/>
<exclude name="com/threerings/miso/viewer/**" unless="build.xml"/>
<compilerarg value="-Xlint"/>
<compilerarg value="-Xlint:-serial"/>
</javac>
</target>
<!-- test the component metadata bundling process -->
<target name="cbundles" description="Build component bundles.">
<!-- define our tasks -->
<taskdef name="metabundle" classpathref="classpath"
classname="com.threerings.cast.bundle.tools.MetadataBundlerTask"/>
<taskdef name="cbundle" classpathref="classpath"
classname="com.threerings.cast.bundle.tools.ComponentBundlerTask"/>
<!-- build the metadata bundles -->
<metabundle actiondef="${cbundle.dir}/actions.xml" classdef="${cbundle.dir}/classes.xml"
target="${cbundle.dir}/metadata.jar"/>
<!-- blow away the components map file so that we get a consistent -->
<!-- mapping every time-->
<delete file="${cbundle.dir}/components.map"/>
<!-- build the component bundles -->
<cbundle actiondef="${cbundle.dir}/actions.xml" target="${cbundle.dir}/pirate/components.jar"
mapfile="${cbundle.dir}/components.map" root="${cbundle.dir}/pirate">
<fileset dir="${cbundle.dir}/pirate" includes="**/*.png" excludes="components/**"/>
</cbundle>
<cbundle actiondef="${cbundle.dir}/actions.xml" target="${cbundle.dir}/vessel/components.jar"
mapfile="${cbundle.dir}/components.map" root="${cbundle.dir}/vessel">
<fileset dir="${cbundle.dir}/vessel" includes="**/*.png"
excludes="components/**"/>
</cbundle>
</target>
<!-- test the tileset bundling process -->
<target name="tsbundles" description="Build tileset bundles.">
<!-- blow away the tilesetid map file so that we get a consistent -->
<!-- mapping every time-->
<delete file="${tbundle.dir}/tilesets.map"/>
<!-- build the tileset bundles -->
<taskdef name="tilebundle" classpathref="classpath"
classname="com.threerings.media.tile.bundle.tools.TileSetBundlerTask"/>
<tilebundle config="${tbundle.dir}/bundler-config.xml" mapfile="${tbundle.dir}/tilesets.map">
<fileset dir="${tbundle.dir}/ground" includes="**/*.xml"/>
</tilebundle>
<tilebundle config="${tbundle.dir}/bundler-config.xml"
mapfile="${tbundle.dir}/tilesets.map">
<fileset dir="${tbundle.dir}/objects" includes="**/*.xml"/>
</tilebundle>
<!-- build the fringe configurations -->
<taskdef name="conffringe" classpathref="classpath"
classname="com.threerings.miso.tile.tools.CompileFringeConfigurationTask"/>
<conffringe
tilesetmap="${tbundle.dir}/tilesets.map"
fringedef="${basedir}/rsrc/config/miso/tile/fringeconf.xml"
target="${basedir}/rsrc/config/miso/tile/fringeconf.dat"/>
</target>
<target name="tests" depends="compile,cbundles,tsbundles" description="Runs the tests.">
<junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
<classpath refid="classpath"/>
<sysproperty key="test_dir" value="${test.dir}"/>
<sysproperty key="resource_dir" value="${test.dir}/rsrc"/>
<sysproperty key="no_unpack_resources" value="true"/>
<formatter type="brief" usefile="false"/>
<batchtest>
<fileset dir="${src.dir}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
</project>