javacommons/javastorage/tsrc/java_api/build/build.xml
changeset 80 d6dafc5d983f
parent 21 2a9601315dfc
equal deleted inserted replaced
78:71ad690e91f5 80:d6dafc5d983f
     1 <!--
     1 <!--
     2 #
     2 #
     3 # Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 # Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 # All rights reserved.
     4 # All rights reserved.
     5 # This component and the accompanying materials are made available
     5 # This component and the accompanying materials are made available
     6 # under the terms of "Eclipse Public License v1.0"
     6 # under the terms of "Eclipse Public License v1.0"
     7 # which accompanies this distribution, and is available
     7 # which accompanies this distribution, and is available
     8 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
    10 # Initial Contributors:
    10 # Initial Contributors:
    11 # Nokia Corporation - initial contribution.
    11 # Nokia Corporation - initial contribution.
    12 #
    12 #
    13 # Contributors:
    13 # Contributors:
    14 #
    14 #
    15 # Description: 
    15 # Description:
    16 #
    16 #
    17 -->
    17 -->
    18 
    18 
    19 <project name="javastoragetest" default="deploy.ut" basedir=".">
    19 <project name="javastorageunittests" basedir="." default="deploy">
    20 
    20 
    21   <import file="../../../../../build/utilities.xml"/>
    21   <import file="../../../../../build/utilities.xml"/>
       
    22   <property file="../../../../../build/unittest.properties"/>
    22 
    23 
    23   <property environment="env"/>
    24   <property name="java.src.paths" value="../javasrc"/>
    24   <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
    25   <property name="java.bin.root" value="${env.JAVA_BIN_ROOT}"/>
    25   <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>
       
    26 
    26 
    27   <property name="src.dir" location="../javasrc"/>
    27   <target name="run" depends="deploy">
    28   <property name="build.dir" location="../build"/>
    28       <echo>Running TestStorageAttribute</echo>
    29   <property name="classes.dir" location="${build.dir}/javabuild"/>
    29       <exec executable="${java.bin.root}/bin/javaunittester">
    30   <property name="dist" location="${java.bin.root}/jsr/classes"/>
    30           <arg line="-mainclass=com.nokia.mj.impl.storage.TestStorageAttribute"/>
    31   <property name="installer.jar.filename" value="javainstaller.jar"/>
    31       </exec>
    32   <property name="javastoragetest.jar.filename" value="javastoragetest.jar"/>
       
    33   <property name="utils.jar.filename" value="javacommonutils.jar"/>
       
    34   <property name="logger.jar.filename" value="logger.jar"/>
       
    35   <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
       
    36   <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
       
    37   <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
       
    38 
    32 
    39   <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
    33       <echo>Running TestStorageAttribute</echo>
    40 
    34       <exec executable="${java.bin.root}/bin/javaunittester">
    41   <property name="javac.source" value="1.3"/>
    35           <arg line="-mainclass=com.nokia.mj.test.storage.TestStorageEntry"/>
    42   <property name="javac.target" value="1.3"/>
    36       </exec>
    43 
       
    44   <target name="clean">
       
    45     <delete dir="${classes.dir}"/>
       
    46     <delete file="${dist}/${javastoragetest.jar.filename}"/>
       
    47     <delete file="${dist}/${junit.jar.filename}"/>
       
    48     <delete file="${dist}/${junit.omj.jar.filename}"/>
       
    49   </target>
    37   </target>
    50 
    38   
    51   <target name="compile.ut" depends="init.properties">
    39   <!-- NOTE: MISSING CASES from test run -->
    52     <property name="jars.dir" location="${jarfiles.collect.root}"/>
       
    53     <property name="jars.dir.cdc" location="${jarfiles.collect.cdc.root}"/>
       
    54     <mkdir dir="${classes.dir}"/>
       
    55     <javac source="${javac.source}" target="${javac.target}"
       
    56            destdir="${classes.dir}"
       
    57            bootclasspath="${bootclasspath.cdc}">
       
    58            <classpath>
       
    59                <pathelement
       
    60                  location="${jars.dir.cdc}/${installer.jar.filename}"/>
       
    61                <pathelement location="${impl.cldc.jar}"/>
       
    62                <pathelement location="${impl.cdc.jar}"/>
       
    63                <pathelement location="${public.api.jar}"/>
       
    64                <pathelement location="${platform.api.jar}"/>
       
    65                <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
       
    66                <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
       
    67            </classpath>
       
    68       <src path="${src.dir}"/>
       
    69     </javac>
       
    70   </target>
       
    71 
       
    72   <target name="deploy.ut" depends="compile.ut">
       
    73       <mkdir dir="${dist}"/>
       
    74       <jar destfile="${vm.extension.directory}/${javastoragetest.jar.filename}" basedir="${classes.dir}"/>
       
    75       <copy file="${junit.jar.dir}/${junit.jar.filename}"
       
    76             tofile="${vm.extension.directory}/${junit.jar.filename}"/>
       
    77       <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
       
    78             tofile="${vm.extension.directory}/${junit.omj.jar.filename}"/>
       
    79   </target>
       
    80 
    40 
    81   <target name="main" depends="clean,run"/>
    41   <target name="main" depends="clean,run"/>
    82 
    42 
    83   <!--<target name="run" depends="deploy.ut">
       
    84       <echo>Running TestStorageAttribute</echo>
       
    85       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
    86           <arg line="test -mainclass=com.nokia.mj.impl.storage.TestStorageAttribute"/>
       
    87       </exec>
       
    88   </target>-->
       
    89 
       
    90   <target name="run" depends="deploy.ut">
       
    91       <echo>Running TestStorageAttribute</echo>
       
    92       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
    93           <arg line="test -mainclass=com.nokia.mj.impl.storage.TestStorageAttribute"/>
       
    94       </exec>
       
    95       <echo>Running TestStorageEntry</echo>
       
    96       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
    97           <arg line="test -mainclass=com.nokia.mj.test.storage.TestStorageEntry"/>
       
    98       </exec>
       
    99       <echo>Running TestConnection</echo>
       
   100       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   101           <arg line="test -mainclass=com.nokia.mj.test.storage.TestConnection"/>
       
   102       </exec>
       
   103       <echo>Running TestTransaction</echo>
       
   104       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   105           <arg line="test -mainclass=com.nokia.mj.test.storage.TestTransaction"/>
       
   106       </exec>
       
   107       <echo>Running TestSearch</echo>
       
   108       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   109           <arg line="test -mainclass=com.nokia.mj.test.storage.TestSearch"/>
       
   110       </exec>
       
   111       <echo>Running TestWrite</echo>
       
   112       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   113           <arg line="test -mainclass=com.nokia.mj.test.storage.TestWrite"/>
       
   114       </exec>
       
   115       <echo>Running TestUpdate</echo>
       
   116       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   117           <arg line="test -mainclass=com.nokia.mj.test.storage.TestUpdate"/>
       
   118       </exec>
       
   119       <echo>Running TestRemove</echo>
       
   120       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   121           <arg line="test -mainclass=com.nokia.mj.test.storage.TestRemove"/>
       
   122       </exec>
       
   123       <echo>Running TestRead</echo>
       
   124       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   125           <arg line="test -mainclass=com.nokia.mj.test.storage.TestRead"/>
       
   126       </exec>
       
   127       <echo>Running TestCreateTable</echo>
       
   128       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   129           <arg line="test -mainclass=com.nokia.mj.test.storage.TestCreateTable"/>
       
   130       </exec>
       
   131       <echo>Running TestAppendTable</echo>
       
   132       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   133           <arg line="test -mainclass=com.nokia.mj.test.storage.TestAppendTable"/>
       
   134       </exec>
       
   135       <echo>Running TestOTATable</echo>
       
   136       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   137           <arg line="test -mainclass=com.nokia.mj.test.storage.TestOTATable"/>
       
   138       </exec>
       
   139       <echo>Running TestPreinstallTable</echo>
       
   140       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   141           <arg line="test -mainclass=com.nokia.mj.test.storage.TestPreinstallTable"/>
       
   142       </exec>
       
   143       <echo>Running TestRobustness</echo>
       
   144       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   145           <arg line="test -mainclass=com.nokia.mj.test.storage.TestRobustness"/>
       
   146       </exec>
       
   147       <echo>Running TestStorageException</echo>
       
   148       <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
       
   149           <arg line="test -mainclass=com.nokia.mj.test.storage.TestStorageException"/>
       
   150       </exec>
       
   151   </target>
       
   152 </project>
    43 </project>