Since TestClient is used outside of Narya, it gets to live in with the rest of
the real source code. That's where reusable classes live. Amazing! Also cleaned up some build.xml bits and nixed the Retroweaver stuff. I thought we might have still been using that, but then I saw the hardcoded path to /usr/local/jdk1.4 and knew that it couldn't be so. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6285 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -84,7 +84,7 @@
|
|||||||
<delete dir="${deploy.dir}"/>
|
<delete dir="${deploy.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="compile" depends="-prepare" description="Builds the Java code">
|
<target name="compile" depends="-prepare" description="Builds the Java code.">
|
||||||
<javac srcdir="${src.dir}" destdir="${classes.dir}" includeAntRuntime="false"
|
<javac srcdir="${src.dir}" destdir="${classes.dir}" includeAntRuntime="false"
|
||||||
debug="on" optimize="${build.optimize}" deprecation="on"
|
debug="on" optimize="${build.optimize}" deprecation="on"
|
||||||
source="1.5" target="1.5" classpathref="compile.classpath">
|
source="1.5" target="1.5" classpathref="compile.classpath">
|
||||||
@@ -169,25 +169,22 @@
|
|||||||
description="Runs unit tests. Use -Dtest=Foo to run only FooTest.">
|
description="Runs unit tests. Use -Dtest=Foo to run only FooTest.">
|
||||||
<taskdef name="unit" classpathref="test.classpath"
|
<taskdef name="unit" classpathref="test.classpath"
|
||||||
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
|
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
|
||||||
|
<mkdir dir="${deploy.dir}/test-reports"/>
|
||||||
<unit printsummary="off" haltonfailure="yes">
|
<unit printsummary="off" haltonfailure="yes">
|
||||||
<classpath refid="test.classpath"/>
|
<classpath refid="test.classpath"/>
|
||||||
<sysproperty key="test_dir" value="${tclasses.dir}"/>
|
<sysproperty key="test_dir" value="${tclasses.dir}"/>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<batchtest>
|
<formatter type="xml"/>
|
||||||
|
<batchtest todir="${deploy.dir}/test-reports">
|
||||||
<fileset dir="${tsrc.dir}" includes="**/*${test}*Test.java"/>
|
<fileset dir="${tsrc.dir}" includes="**/*${test}*Test.java"/>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
</unit>
|
</unit>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- a target for rebuilding everything -->
|
<target name="dist" depends="compile,procstream,aslib" description="Builds jar files.">
|
||||||
<target name="all" depends="clean,compile,aslib,javadoc,dist"/>
|
|
||||||
|
|
||||||
<!-- builds our distribution files (war and jar) -->
|
|
||||||
<target name="dist" depends="compile,procstream,aslib">
|
|
||||||
<!-- build our main jar file -->
|
<!-- build our main jar file -->
|
||||||
<jar destfile="${deploy.dir}/${lib.name}.jar">
|
<jar destfile="${deploy.dir}/${lib.name}.jar">
|
||||||
<fileset dir="${classes.dir}" includes="**"/>
|
<fileset dir="${classes.dir}" includes="**"/>
|
||||||
<fileset dir="${tclasses.dir}" includes="com/threerings/crowd/client/TestClient*"/>
|
|
||||||
</jar>
|
</jar>
|
||||||
|
|
||||||
<!-- we export a small selection of classes for use by GWT -->
|
<!-- we export a small selection of classes for use by GWT -->
|
||||||
@@ -204,8 +201,8 @@
|
|||||||
<delete dir="${gwtjar.dir}"/>
|
<delete dir="${gwtjar.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- generates fields for persistent record classes -->
|
<target name="genrecord" depends="-prepare"
|
||||||
<target name="genrecord" depends="-prepare">
|
description="Generates fields for persistent record classes.">
|
||||||
<taskdef name="grecord" classname="com.samskivert.depot.tools.GenRecordTask"
|
<taskdef name="grecord" classname="com.samskivert.depot.tools.GenRecordTask"
|
||||||
classpathref="compile.classpath"/>
|
classpathref="compile.classpath"/>
|
||||||
<!-- make sure the record class files are all compiled -->
|
<!-- make sure the record class files are all compiled -->
|
||||||
@@ -333,39 +330,6 @@
|
|||||||
</genascript>
|
</genascript>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- various bits used by the retroweaver tasks -->
|
|
||||||
<property name="inpre" value="${deploy.dir}/${lib.name}"/>
|
|
||||||
<property name="outpre" value="${deploy.dir}/retro/${lib.name}"/>
|
|
||||||
|
|
||||||
<target name="retro" depends="dist"
|
|
||||||
description="Converts our 1.5 code to a 1.4 compatible format">
|
|
||||||
<artifact:dependencies pathId="retroweaver.classpath">
|
|
||||||
<dependency groupId="net.sourceforge.retroweaver" artifactId="retroweaver" version="1.2.3"/>
|
|
||||||
</artifact:dependencies>
|
|
||||||
<taskdef name="weave" classpathref="retroweaver.classpath"
|
|
||||||
classname="com.rc.retroweaver.ant.RetroWeaverTask"/>
|
|
||||||
<mkdir dir="${deploy.dir}/retro"/>
|
|
||||||
|
|
||||||
<!-- we weave everything a first time without verification so that -->
|
|
||||||
<!-- interdependencies will resolve the second time -->
|
|
||||||
<weave inputjar="${inpre}-base.jar" outputjar="${outpre}-base.jar"/>
|
|
||||||
<weave inputjar="${inpre}-distrib.jar" outputjar="${outpre}-distrib.jar"/>
|
|
||||||
|
|
||||||
<!-- now weave again with the verifier to check for unweavable 1.5isms -->
|
|
||||||
<antcall target="-vweave"><param name="which" value="base"/></antcall>
|
|
||||||
<antcall target="-vweave"><param name="which" value="distrib"/></antcall>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="-vweave">
|
|
||||||
<weave inputjar="${inpre}-${which}.jar" outputjar="${outpre}-${which}.jar" failonerror="true">
|
|
||||||
<classpath>
|
|
||||||
<path refid="compile.classpath"/>
|
|
||||||
<pathelement location="/usr/local/jdk1.4/jre/lib/rt.jar"/>
|
|
||||||
<fileset dir="${deploy.dir}/retro" includes="*.jar"/>
|
|
||||||
</classpath>
|
|
||||||
</weave>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="snapshot" description="Creates a zipfile with our source distribution">
|
<target name="snapshot" description="Creates a zipfile with our source distribution">
|
||||||
<delete file="${deploy.dir}/${lib.name}-snapshot.zip"/>
|
<delete file="${deploy.dir}/${lib.name}-snapshot.zip"/>
|
||||||
<mkdir dir="${deploy.dir}/snapshot/${lib.name}"/>
|
<mkdir dir="${deploy.dir}/snapshot/${lib.name}"/>
|
||||||
|
|||||||
+3
@@ -37,6 +37,9 @@ import com.threerings.crowd.util.CrowdContext;
|
|||||||
|
|
||||||
import static com.threerings.crowd.Log.log;
|
import static com.threerings.crowd.Log.log;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A client that is useful when doing unit testing.
|
||||||
|
*/
|
||||||
public class TestClient
|
public class TestClient
|
||||||
implements ClientObserver
|
implements ClientObserver
|
||||||
{
|
{
|
||||||
Reference in New Issue
Block a user