Generate test output to dist/tests. Run tests before deploying to Maven.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2946 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -102,6 +102,7 @@
|
|||||||
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="classpath"
|
<taskdef name="unit" classpathref="classpath"
|
||||||
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
|
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
|
||||||
|
<mkdir dir="${deploy.dir}/tests"/>
|
||||||
<unit printsummary="off" haltonfailure="yes" fork="${junit.fork}">
|
<unit printsummary="off" haltonfailure="yes" fork="${junit.fork}">
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${classes.dir}"/>
|
<pathelement location="${classes.dir}"/>
|
||||||
@@ -111,7 +112,8 @@
|
|||||||
</classpath>
|
</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}/tests">
|
||||||
<fileset dir="${test.dir}" includes="**/*${test}*Test.java"/>
|
<fileset dir="${test.dir}" includes="**/*${test}*Test.java"/>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
</unit>
|
</unit>
|
||||||
@@ -132,7 +134,7 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<property name="maven.deploy.repo" value="file://${user.home}/.m2/repository"/>
|
<property name="maven.deploy.repo" value="file://${user.home}/.m2/repository"/>
|
||||||
<target name="maven-deploy" depends="dist"
|
<target name="maven-deploy" depends="dist,tests"
|
||||||
description="Deploys our build artifacts to a Maven repository.">
|
description="Deploys our build artifacts to a Maven repository.">
|
||||||
<artifact:deploy file="${deploy.dir}/${lib.name}.jar" uniqueVersion="false">
|
<artifact:deploy file="${deploy.dir}/${lib.name}.jar" uniqueVersion="false">
|
||||||
<remoteRepository url="${maven.deploy.repo}"/>
|
<remoteRepository url="${maven.deploy.repo}"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user