Fix build-coverage to include WTK libraries (needed for J2ME math tests.)

This commit is contained in:
Ian Farmer
2008-07-24 06:35:17 +00:00
parent 27c7156e68
commit 7f1c388919
3 changed files with 33 additions and 27 deletions

View File

@@ -20,7 +20,9 @@
</path> </path>
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" /> <taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
<import file="wtk.xml"/>
<target name="clean" description="Remove all files created by the build/test process."> <target name="clean" description="Remove all files created by the build/test process.">
<delete dir="build" failonerror="no"/> <delete dir="build" failonerror="no"/>
<delete file="cobertura.log" /> <delete file="cobertura.log" />
@@ -36,9 +38,10 @@
<mkdir dir="${coverage.html.dir}" /> <mkdir dir="${coverage.html.dir}" />
</target> </target>
<target name="compile" depends="init"> <target name="compile" depends="init,wtk-or-fail">
<javac destdir="${classes.dir}" debug="yes" target="1.5"> <javac destdir="${classes.dir}" debug="yes" target="1.5">
<classpath refid="cobertura.classpath" /> <classpath refid="cobertura.classpath" />
<classpath refid="wtk-libs" />
<src path="src/core"/> <src path="src/core"/>
<src path="src/debug"/> <src path="src/debug"/>
<src path="src/j2me"/> <src path="src/j2me"/>
@@ -96,4 +99,4 @@
<target name="all" depends="clean,init,compile,instrument,test,coverage" /> <target name="all" depends="clean,init,compile,instrument,test,coverage" />
</project> </project>

View File

@@ -4,6 +4,8 @@
<property name="jar.name.j2me" value="luaj-j2me-${version}.jar"/> <property name="jar.name.j2me" value="luaj-j2me-${version}.jar"/>
<property name="jar.name.j2se" value="luaj-j2se-${version}.jar"/> <property name="jar.name.j2se" value="luaj-j2se-${version}.jar"/>
<import file="wtk.xml"/>
<target name="clean"> <target name="clean">
<delete dir="build"/> <delete dir="build"/>
<delete> <delete>
@@ -57,30 +59,6 @@
</jar> </jar>
</target> </target>
<target name="load-env">
<property environment="env"/>
<echo>WTK_HOME from env ${env.WTK_HOME}</echo>
</target>
<target name="try-default-wtk-path" depends="load-env" unless="env.WTK_HOME">
<available property="env.WTK_HOME" value="c:\WTK-2.2" file="c:\WTK-2.2\lib\cldcapi11.jar"/>
<available property="env.WTK_HOME" value="/opt/WTK2.2" file="/opt/WTK2.2/lib/cldcapi11.jar"/>
</target>
<target name="find-wtk" depends="try-default-wtk-path" unless="wtk.home" if="env.WTK_HOME">
<property name="wtk.home" value="${env.WTK_HOME}"/>
</target>
<target name="wtk-or-fail" depends="find-wtk">
<fail unless="wtk.home" message="Sun Wireless Toolkit required to build component jars."/>
<echo>Using WTK found in ${wtk.home}</echo>
<path id="wtk-libs">
<pathelement path="${wtk.home}/lib/cldcapi11.jar"/>
<pathelement path="${wtk.home}/lib/midpapi20.jar"/>
<pathelement path="${wtk.home}/lib/mmapi.jar"/>
</path>
</target>
<target name="dist"> <target name="dist">
<delete dir="build/luaj-${version}"/> <delete dir="build/luaj-${version}"/>
<mkdir dir="build/luaj-${version}/src"/> <mkdir dir="build/luaj-${version}/src"/>

25
wtk.xml Normal file
View File

@@ -0,0 +1,25 @@
<project>
<target name="load-env">
<property environment="env"/>
<echo>WTK_HOME from env ${env.WTK_HOME}</echo>
</target>
<target name="try-default-wtk-path" depends="load-env" unless="env.WTK_HOME">
<available property="env.WTK_HOME" value="c:\WTK-2.2" file="c:\WTK-2.2\lib\cldcapi11.jar"/>
<available property="env.WTK_HOME" value="/opt/WTK2.2" file="/opt/WTK2.2/lib/cldcapi11.jar"/>
</target>
<target name="find-wtk" depends="try-default-wtk-path" unless="wtk.home" if="env.WTK_HOME">
<property name="wtk.home" value="${env.WTK_HOME}"/>
</target>
<target name="wtk-or-fail" depends="find-wtk">
<fail unless="wtk.home" message="Sun Wireless Toolkit required to build component jars."/>
<echo>Using WTK found in ${wtk.home}</echo>
<path id="wtk-libs">
<pathelement path="${wtk.home}/lib/cldcapi11.jar"/>
<pathelement path="${wtk.home}/lib/midpapi20.jar"/>
<pathelement path="${wtk.home}/lib/mmapi.jar"/>
</path>
</target>
</project>