|
1 <!-- |
|
2 # |
|
3 # Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 # All rights reserved. |
|
5 # This component and the accompanying materials are made available |
|
6 # under the terms of "Eclipse Public License v1.0" |
|
7 # which accompanies this distribution, and is available |
|
8 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 # |
|
10 # Initial Contributors: |
|
11 # Nokia Corporation - initial contribution. |
|
12 # |
|
13 # Contributors: |
|
14 # |
|
15 # Description: RMS unit test build script (to be run in main application) |
|
16 # |
|
17 --> |
|
18 |
|
19 <project name="rmsunittest" default="deploy.ut" basedir="."> |
|
20 |
|
21 <import file="../../../../../build/utilities.xml"/> |
|
22 |
|
23 <property environment="env"/> |
|
24 <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/> |
|
25 <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/> |
|
26 |
|
27 <property name="src.dir" location="../javasrc"/> |
|
28 <property name="build.dir" location="../build"/> |
|
29 <property name="classes.dir" location="${build.dir}/javabuild"/> |
|
30 |
|
31 <property name="rmsunittest.jar.filename" value="rmsunittest.jar"/> |
|
32 <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/> |
|
33 <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/> |
|
34 <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/> |
|
35 |
|
36 <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/> |
|
37 |
|
38 <property name="javac.source" value="1.3"/> |
|
39 <property name="javac.target" value="1.3"/> |
|
40 |
|
41 <target name="clean" depends="init.properties"> |
|
42 <delete dir="${classes.dir}"/> |
|
43 <delete file="${vm.extension.directory}/${rmsunittest.jar.filename}"/> |
|
44 <delete file="${vm.extension.directory}/${junit.jar.filename}"/> |
|
45 <delete file="${vm.extension.directory}/${junit.omj.jar.filename}"/> |
|
46 </target> |
|
47 |
|
48 <target name="compile.ut" depends="init.properties"> |
|
49 <mkdir dir="${classes.dir}"/> |
|
50 <javac source="${javac.source}" target="${javac.target}" |
|
51 destdir="${classes.dir}" |
|
52 bootclasspath="${bootclasspath.cdc}"> |
|
53 <classpath> |
|
54 <pathelement location="${impl.cldc.jar}"/> |
|
55 <pathelement location="${impl.cdc.jar}"/> |
|
56 <pathelement location="${public.api.jar}"/> |
|
57 <pathelement location="${platform.api.jar}"/> |
|
58 <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/> |
|
59 <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/> |
|
60 </classpath> |
|
61 <src path="${src.dir}"/> |
|
62 </javac> |
|
63 </target> |
|
64 |
|
65 <target name="deploy.ut" depends="compile.ut"> |
|
66 <jar destfile="${vm.extension.directory}/${rmsunittest.jar.filename}" basedir="${classes.dir}"/> |
|
67 <copy file="${junit.jar.dir}/${junit.jar.filename}" |
|
68 tofile="${vm.extension.directory}/${junit.jar.filename}"/> |
|
69 <copy file="${junit.jar.dir}/${junit.omj.jar.filename}" |
|
70 tofile="${vm.extension.directory}/${junit.omj.jar.filename}"/> |
|
71 </target> |
|
72 |
|
73 <target name="main" depends="clean,run"/> |
|
74 |
|
75 <target name="run" depends="deploy.ut"> |
|
76 <echo>Running Rms Unit Tests</echo> |
|
77 <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller"> |
|
78 <arg line="test -mainclass=com.nokia.mj.test.rms.RmsMain"/> |
|
79 </exec> |
|
80 </target> |
|
81 </project> |