javaextensions/wma/mms/tsrc/generictests/build.xml
branchRCL_3
changeset 18 9ac0a0a7da70
parent 17 0fd27995241b
child 19 71c436fe3ce0
equal deleted inserted replaced
17:0fd27995241b 18:9ac0a0a7da70
     1 <!--
       
     2 #
       
     3 # Copyright (c) 2008-2009 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: 
       
    16 #
       
    17 -->
       
    18 
       
    19 <project name="MmsGenericTests" 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;../moduletestframework/javasrc"/>
       
    28   <property name="build.dir" location="."/>
       
    29   <property name="classes.dir" location="${build.dir}/javabuild"/>
       
    30   <property name="installer.jar.filename" value="javainstaller.jar"/>
       
    31   <property name="mmstests.jar.filename" value="MmsGenericTests.jar"/>
       
    32   <property name="utils.jar.filename" value="javacommonutils.jar"/>
       
    33   <property name="logger.jar.filename" value="logger.jar"/>
       
    34   <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
       
    35   <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
       
    36   <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
       
    37 
       
    38   <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
       
    39 
       
    40   <property name="javac.source" value="1.3"/>
       
    41   <property name="javac.target" value="1.3"/>
       
    42 
       
    43   <target name="init.my.properties" depends="init.properties">
       
    44     <property name="dist" location="${vm.extension.directory}"/>
       
    45   </target>
       
    46   <target name="clean">
       
    47     <delete dir="${classes.dir}"/>
       
    48     <delete file="${dist}/${mmstests.jar.filename}"/>
       
    49     <delete file="${dist}/${junit.jar.filename}"/>
       
    50     <delete file="${dist}/${junit.omj.jar.filename}"/>
       
    51   </target>
       
    52 
       
    53   <target name="compile.ut" depends="init.properties">
       
    54    
       
    55     <property name="jars.dir" location="${jarfiles.collect.root}"/>
       
    56     <property name="jars.dir.cdc" location="${jarfiles.collect.cdc.root}"/>
       
    57     <mkdir dir="${classes.dir}"/>
       
    58     <javac source="${javac.source}" target="${javac.target}"
       
    59            destdir="${classes.dir}"
       
    60            bootclasspath="${bootclasspath.cdc}">
       
    61            <classpath>
       
    62                <pathelement
       
    63                  location="${jars.dir.cdc}/${installer.jar.filename}"/>
       
    64                <pathelement location="${impl.cldc.jar}"/>
       
    65                <pathelement location="${impl.cdc.jar}"/>
       
    66                <pathelement location="${public.api.jar}"/>
       
    67                <pathelement location="${platform.api.jar}"/>
       
    68                <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
       
    69                <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
       
    70            </classpath>
       
    71       <src path="${src.dir}"/>
       
    72     </javac>
       
    73     <ant antfile="${java.src.root}\tools\junit\JsrTestRunner\build\build.xml">
       
    74    </ant>
       
    75   </target>
       
    76 
       
    77   <target name="deploy.ut" depends="compile.ut,init.my.properties">
       
    78       <mkdir dir="${dist}"/>
       
    79       <jar destfile="${dist}/${mmstests.jar.filename}" basedir="${classes.dir}"/>
       
    80       <copy file="${junit.jar.dir}/${junit.jar.filename}"
       
    81             tofile="${dist}/${junit.jar.filename}"/>
       
    82       <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
       
    83             tofile="${dist}/${junit.omj.jar.filename}"/>
       
    84   </target>
       
    85 
       
    86   <target name="main" depends="clean,run"/>
       
    87 
       
    88   <target name="run" depends="deploy.ut">
       
    89       <echo>Running OpenTests</echo>
       
    90       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
    91           <arg line="test -mainclass=com.nokia.mj.impl.sms.OpenTests"/>
       
    92       </exec>
       
    93       <echo>Running CloseTests</echo>
       
    94       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
    95           <arg line="test -mainclass=com.nokia.mj.impl.sms.CloseTests"/>
       
    96       </exec>
       
    97   </target>
       
    98 </project>