|
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="fileutilstests" 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 <!-- <property name="src.dir" location="../javasrc"/> --> |
|
27 <property name="build.dir" location="../build"/> |
|
28 <property name="classes.dir" location="${build.dir}/javabuild"/> |
|
29 <!-- <property name="dist" location="${java.bin.root}/jsr/classes"/> --> |
|
30 <property name="installer.jar.dir" location="${dist}"/> |
|
31 <property name="installer.jar.filename" value="installer.jar"/> |
|
32 <property name="fileutilstests.jar.filename" value="fileutilstests.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 |
|
39 <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/> |
|
40 |
|
41 <property name="javac.source" value="1.3"/> |
|
42 <property name="javac.target" value="1.3"/> |
|
43 |
|
44 <!-- Choose appropriate path depending on the platform --> |
|
45 <target name="init.component.properties"> |
|
46 <property name="dist" |
|
47 value="${vm.extension.directory}"/> |
|
48 <echo message="dist = ${dist}"/> |
|
49 <condition property="java.src.paths" |
|
50 value="../javasrc:../javasrc.s60" |
|
51 else="../javasrc:../javasrc.linux"> |
|
52 <isset property="target.s60" /> |
|
53 </condition> |
|
54 <echo message="java.src.paths = ${java.src.paths}"/> |
|
55 </target> |
|
56 |
|
57 <target name="clean" depends="init.properties"> |
|
58 <delete dir="${classes.dir}"/> |
|
59 <delete file="${dist}/${fileutilstests.jar.filename}"/> |
|
60 <delete file="${dist}/${junit.jar.filename}"/> |
|
61 <delete file="${dist}/${junit.omj.jar.filename}"/> |
|
62 </target> |
|
63 |
|
64 <target name="compile.ut" depends="init.properties"> |
|
65 <mkdir dir="${classes.dir}"/> |
|
66 <javac source="${javac.source}" target="${javac.target}" |
|
67 destdir="${classes.dir}" |
|
68 bootclasspath="${bootclasspath.cdc}"> |
|
69 <classpath> |
|
70 <pathelement location="${impl.cldc.jar}"/> |
|
71 <pathelement location="${impl.cdc.jar}"/> |
|
72 <pathelement location="${public.api.jar}"/> |
|
73 <pathelement location="${platform.api.jar}"/> |
|
74 <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/> |
|
75 <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/> |
|
76 </classpath> |
|
77 <src path="${java.src.paths}"/> |
|
78 </javac> |
|
79 </target> |
|
80 |
|
81 <target name="deploy.ut" depends="compile.ut"> |
|
82 <mkdir dir="${dist}"/> |
|
83 <jar destfile="${dist}/${fileutilstests.jar.filename}" basedir="${classes.dir}"/> |
|
84 <copy file="${junit.jar.dir}/${junit.jar.filename}" |
|
85 tofile="${dist}/${junit.jar.filename}"/> |
|
86 <copy file="${junit.jar.dir}/${junit.omj.jar.filename}" |
|
87 tofile="${dist}/${junit.omj.jar.filename}"/> |
|
88 </target> |
|
89 |
|
90 <target name="run" depends="deploy.ut"> |
|
91 <echo>Running Common File Utility Tests</echo> |
|
92 <!-- |
|
93 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
94 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestFileCreate"/> |
|
95 </exec> |
|
96 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
97 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestExists"/> |
|
98 </exec> |
|
99 --> |
|
100 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
101 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestIsFile"/> |
|
102 </exec> |
|
103 <!-- |
|
104 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
105 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestIsDir"/> |
|
106 </exec> |
|
107 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
108 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestCanRead"/> |
|
109 </exec> |
|
110 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
111 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestCanWrite"/> |
|
112 </exec> |
|
113 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
114 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestFileSize"/> |
|
115 </exec> |
|
116 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
117 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestSystemSpace"/> |
|
118 </exec> |
|
119 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
120 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestLastModified"/> |
|
121 </exec> |
|
122 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
123 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestDirCreate"/> |
|
124 </exec> |
|
125 --> |
|
126 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
127 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestRename"/> |
|
128 </exec> |
|
129 <!-- |
|
130 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
131 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestInputStream"/> |
|
132 </exec> |
|
133 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
134 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestList"/> |
|
135 </exec> |
|
136 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
137 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestDelete"/> |
|
138 </exec> |
|
139 <exec executable="${java.bin.root}/bin/javainstaller"> |
|
140 <arg line="test -mainclass=com.nokia.mj.impl.fileutils.TestMkdirs"/> |
|
141 </exec> |
|
142 --> |
|
143 </target> |
|
144 <target name="main" depends="clean,run"/> |
|
145 |
|
146 </project> |