|
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="JavaInstallerTest" basedir="." default="deploy.ut"> |
|
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="testdata.dir" location="../testdata"/> |
|
30 <property name="inbox.dir" value="private/1000484b"/> |
|
31 <property name="classes.dir" location="${build.dir}/javabuild"/> |
|
32 <property name="installer.datacage.dir" value="private/102033E6"/> |
|
33 <property name="plugins.conf.filename" value="inst_plugins.cfg"/> |
|
34 <property name="installer.jar.filename" value="javainstaller.jar"/> |
|
35 <property name="installercdc.jar.filename" value="javainstallercdc.jar"/> |
|
36 <property name="installertest.jar.filename" value="installertest.jar"/> |
|
37 <property name="logger.jar.filename" value="logger.jar"/> |
|
38 <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/> |
|
39 <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/> |
|
40 <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/> |
|
41 |
|
42 <target name="init.installer.root"> |
|
43 <condition property="java.installer.root" |
|
44 value="/epoc32/winscw/c/${installer.datacage.dir}/installer" |
|
45 else="${env.JAVA_BIN_ROOT}/installer"> |
|
46 <isset property="target.s60" /> |
|
47 </condition> |
|
48 <condition property="inbox.full.dir" |
|
49 value="/epoc32/winscw/c/${inbox.dir}" |
|
50 else="${env.JAVA_BIN_ROOT}/installer/${inbox.dir}"> |
|
51 <isset property="target.s60" /> |
|
52 </condition> |
|
53 </target> |
|
54 |
|
55 <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/> |
|
56 |
|
57 <property name="javac.source" value="1.3"/> |
|
58 <property name="javac.target" value="1.3"/> |
|
59 |
|
60 <target name="clean" depends="init.properties,init.installer.root"> |
|
61 <property name="dist.dir" location="${vm.extension.directory}"/> |
|
62 <delete dir="${classes.dir}"/> |
|
63 <delete file="test.dat"/> |
|
64 <delete file="${dist.dir}/${installertest.jar.filename}"/> |
|
65 <delete file="${dist.dir}/${junit.jar.filename}"/> |
|
66 <delete file="${dist.dir}/${junit.omj.jar.filename}"/> |
|
67 <delete dir="${java.installer.root}/jiutdata"/> |
|
68 <delete file="${java.installer.root}/${plugins.conf.filename}"/> |
|
69 <delete dir="${inbox.full.dir}"/> |
|
70 </target> |
|
71 |
|
72 <target name="compile.ut" depends="init.properties"> |
|
73 <mkdir dir="${classes.dir}"/> |
|
74 <javac source="${javac.source}" target="${javac.target}" |
|
75 destdir="${classes.dir}" |
|
76 bootclasspath="${bootclasspath.cdc}"> |
|
77 <classpath> |
|
78 <pathelement location="${impl.cldc.jar}"/> |
|
79 <pathelement location="${impl.cdc.jar}"/> |
|
80 <pathelement location="${public.api.jar}"/> |
|
81 <pathelement location="${platform.api.jar}"/> |
|
82 <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/> |
|
83 <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/> |
|
84 </classpath> |
|
85 <src path="${src.dir}"/> |
|
86 </javac> |
|
87 </target> |
|
88 |
|
89 <target name="deploy.ut" depends="compile.ut,init.installer.root"> |
|
90 <property name="dist.dir" location="${vm.extension.directory}"/> |
|
91 <mkdir dir="${dist.dir}"/> |
|
92 <jar destfile="${dist.dir}/${installertest.jar.filename}" basedir="${classes.dir}"/> |
|
93 <copy file="${junit.jar.dir}/${junit.jar.filename}" |
|
94 tofile="${dist.dir}/${junit.jar.filename}"/> |
|
95 <copy file="${junit.jar.dir}/${junit.omj.jar.filename}" |
|
96 tofile="${dist.dir}/${junit.omj.jar.filename}"/> |
|
97 <unzip src="${testdata.dir}/jadjarmatcher/inbox_files_1000484b.zip" |
|
98 dest="${inbox.full.dir}"/> |
|
99 <copy todir="${java.installer.root}"> |
|
100 <fileset dir="${testdata.dir}/jsrpluginnotifier/${installer.datacage.dir}"/> |
|
101 </copy> |
|
102 <copy todir="${java.installer.root}/jiutdata/installerengine"> |
|
103 <fileset dir="${testdata.dir}/installerengine"/> |
|
104 </copy> |
|
105 <copy todir="${java.installer.root}/jiutdata/jadjarmatcher/testapps"> |
|
106 <fileset dir="${testdata.dir}/jadjarmatcher/testapps"/> |
|
107 </copy> |
|
108 <copy todir="${java.installer.root}/jiutdata/utils"> |
|
109 <fileset dir="${testdata.dir}/utils"/> |
|
110 </copy> |
|
111 <touch file="${java.installer.root}/jiutdata/jadjarmatcher/testapps/HelloWorld1_newer.jad" |
|
112 datetime="08/20/2020 4:30 pm"/> |
|
113 </target> |
|
114 |
|
115 <target name="run" depends="deploy.ut"> |
|
116 <property name="testcmd" value="test"/> |
|
117 |
|
118 <echo>Running DriveInfoTest</echo> |
|
119 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
120 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.utils.DriveInfoTest"/> |
|
121 </exec> |
|
122 |
|
123 <echo>Running NotificationPosterTest</echo> |
|
124 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
125 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.downloader.NotificationPosterTest"/> |
|
126 </exec> |
|
127 |
|
128 <echo>Running DownloaderTest</echo> |
|
129 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
130 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.downloader.DownloaderTest"/> |
|
131 </exec> |
|
132 |
|
133 <echo>Running OtaStatusHandlerTest</echo> |
|
134 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
135 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.storagehandler.OtaStatusHandlerTest"/> |
|
136 </exec> |
|
137 |
|
138 <echo>Running IntegrityServiceTest</echo> |
|
139 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
140 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.integrityservice.IntegrityServiceTest -log=is"/> |
|
141 </exec> |
|
142 |
|
143 <echo>Running JadJarMatcherTest</echo> |
|
144 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
145 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.jadjarmatcher.JadJarMatcherTest"/> |
|
146 </exec> |
|
147 |
|
148 <echo>Running AttributeValidatorTest</echo> |
|
149 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
150 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.utils.AttributeValidatorTest"/> |
|
151 </exec> |
|
152 |
|
153 <echo>Running AttributeReaderTest</echo> |
|
154 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
155 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.utils.AttributeReaderTest"/> |
|
156 </exec> |
|
157 |
|
158 <echo>Running JsrPluginNotifierTest</echo> |
|
159 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
160 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.jsrpluginnotifier.JsrPluginNotifierTest"/> |
|
161 </exec> |
|
162 |
|
163 <echo>Running CustomisationPropertiesTest</echo> |
|
164 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
165 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.customisationproperties.CustomisationPropertiesTest"/> |
|
166 </exec> |
|
167 |
|
168 <echo>Running StorageHandlerTest</echo> |
|
169 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
170 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.storagehandler.StorageHandlerTest"/> |
|
171 </exec> |
|
172 |
|
173 <!-- echo>Running ApplicationRegistratorTest</echo> |
|
174 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
175 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.applicationregistrator.ApplicationRegistratorTest"/> |
|
176 </exec --> |
|
177 |
|
178 <echo>Running InstallerResultMessageTest</echo> |
|
179 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
180 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.InstallerResultMessageTest"/> |
|
181 </exec> |
|
182 |
|
183 <echo>Running GetComponentInfoTest</echo> |
|
184 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
185 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.GetComponentInfoTest"/> |
|
186 </exec> |
|
187 |
|
188 <echo>Running InstallerEngineTest</echo> |
|
189 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
190 <arg line="${testcmd} -mainclass=com.nokia.mj.impl.installer.InstallerEngineTest"/> |
|
191 </exec> |
|
192 </target> |
|
193 |
|
194 <target name="main" depends="clean,run"/> |
|
195 |
|
196 </project> |