Skip to content

Commit

Permalink
a new version of Kamikaze 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hyan committed Aug 23, 2010
1 parent 133fc35 commit 3b32e57
Show file tree
Hide file tree
Showing 28 changed files with 4,351 additions and 3,999 deletions.
132 changes: 72 additions & 60 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@
</dirset>
</path>

<path id="server.compile.class.path">
<fileset dir="${lib}/master">
<include name="*.jar" />
</fileset>
<fileset dir="${lib}/test">
<include name="*.jar" />
</fileset>
<fileset dir="${dist}">
<include name="*.jar" />
</fileset>
</path>

<target name="clean">
<delete dir="${build}" />
<delete dir="${dist}" />
Expand Down Expand Up @@ -84,7 +96,7 @@
</target>

<target name="perfTest" depends="compile-test">
<java classname="com.kamikaze.test.perf.TestCompDecomp" fork="true">
<java classname="com.kamikaze.test.perf.PForDeltaPerfTest" fork="true">
<classpath refid="compile.class.path" />
<classpath refid="java.class.path" />
<classpath refid="test.class.path" />
Expand All @@ -96,65 +108,68 @@
</java>
</target>

<target name="test" description="Runs JUnit Tests" depends="compile-test">
<echo>=== Running JUnit Tests ===</echo>
<mkdir dir="${test.report.dir}" />
<mkdir dir="${test.html.dir}" />
<target name="sizeTest" depends="compile-test">
<java classname="com.kamikaze.docidset.utils.PForDeltaEstimateSizeOfMultiChoices" fork="true">
<classpath refid="compile.class.path" />
<classpath refid="java.class.path" />
<classpath refid="test.class.path" />
<jvmarg value="-d64" />
<jvmarg value="-server" />
<!-- <jvmarg value="-Xprof" /> -->
<jvmarg value="-Xms2G" />
<jvmarg value="-Xmx4G" />
</java>
</target>

<target name="dist" depends="compile" description="--> build .jar into dist">
<jar destfile="${dist}/${project.name}-${version}.jar" basedir="${build}" />
</target>


<target name="test-build" depends="dist">
<javac destdir="${build.test}">
<src path="${test}"/>
<classpath refid="server.compile.class.path"/>
</javac> <jar destfile="${dist}/${project.name}-${version}-test.jar" basedir="${build.test}" />
</target>

<junit printsummary="yes" showoutput="yes" haltonfailure="yes">
<classpath refid="compile.class.path" />
<classpath refid="java.class.path" />
<classpath refid="test.class.path" />
<formatter type="plain" />
<!--
<jvmarg value="-d64" />
<jvmarg value="-Xms2G" />
<jvmarg value="-Xmx4G" />
-->
<jvmarg value="-Xms1g" />
<jvmarg value="-Xmx1500m" />

<test name="com.kamikaze.test.PForDeltaKamikazeTest" todir="${test.report.dir}" haltonfailure="yes" fork="yes">
<formatter type="xml"/>
</test>
</junit>
<junitreport todir="${test.html.dir}">
<fileset dir="${test.report.dir}">
<include name="TEST-*.xml" />
</fileset>
<report todir="${test.html.dir}" format="frames" />
</junitreport>
</target>

<echo>"jar destfile is : ${dist}/${project.name}-${version}.jar"</echo>
<target name="gitversion" description="--> create git version information">
<exec executable="git" outputproperty="gitversion">
<arg value="log" />
<arg value="-1" />
<arg value="--pretty=oneline" />
</exec>
<exec executable="git" outputproperty="gitusername">
<arg value="config" />
<arg value="--get" />
<arg value="user.name" />
</exec>
<exec executable="git" outputproperty="gituseremail">
<arg value="config" />
<arg value="--get" />
<arg value="user.email" />
</exec>
<target name="test" description="Runs JUnit Tests -- use -Dtests.to.run=testA,testB,... to run tests selectively" depends="test-build">
<echo>=== Running JUnit Tests ===</echo>
<mkdir dir="${test.report.dir}" />
<mkdir dir="${test.html.dir}" />

<junit printsummary="yes" showoutput="yes">
<sysproperty key="log.home" value="${logs}" />
<sysproperty key="conf.dir" value="${conf.dir}" />
<sysproperty key="log4j.configuration" value="${log4j.configuration}" />
<sysproperty key="tests.to.run" value="${tests.to.run}" />
<jvmarg value="-server" />
<jvmarg value="-Xms256m" />
<jvmarg value="-Xmx2g" />
<classpath refid="compile.class.path" />
<classpath refid="java.class.path" />
<classpath refid="test.class.path" />

<!-- formatter to use for output -->
<formatter type="xml"/>

<batchtest fork="yes" todir="${test.report.dir}">
<fileset dir="${test}">
<include name="**/TestDocIdSetSuite.java" />
</fileset>
</batchtest>
</junit>
<junitreport todir="${test.html.dir}">
<fileset dir="${test.report.dir}">
<include name="TEST-*.xml" />
</fileset>
<report todir="${test.html.dir}" format="frames" />
</junitreport>
</target>
<target name="jar" depends="compile,gitversion">
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<manifest file="MANIFEST.MF">
<attribute name="Built-By" value="${gitusername} ${gituseremail}" />
<attribute name="Git-Version" value="${gitversion}" />
<attribute name="Built-Date" value="${TODAY}" />
</manifest>
<jar destfile="${dist}/${project.name}-${version}.jar" manifest="MANIFEST.MF" basedir="${build}" />
<delete file="MANIFEST.MF"/>

<target name="jar" depends="compile">
<jar destfile="${dist}/${project.name}-${version}.jar" basedir="${build}" />
</target>
<target name="javadoc" depends="init">
<javadoc packagenames="com.kamikaze.*" sourcepath="src" defaultexcludes="yes" destdir="${doc}" author="true" version="true" use="true" windowtitle="Kamikaze">
Expand All @@ -169,9 +184,6 @@
<link href="http://developer.java.sun.com/developer/products/xml/docs/api/" />
</javadoc>

</target>
<target name="dist" depends="jar,javadoc">

</target>

</project>
Loading

0 comments on commit 3b32e57

Please sign in to comment.