forked from jakartaee/jaf-tck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
182 lines (145 loc) · 6.33 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<project name="jaftck" default="default" basedir=".">
<description>Builds and runs the project jaftck.</description>
<property name="version" value="1.2"/>
<property environment="env"/>
<dirname property="jaftck.basedir" file="${ant.file.jaftck}"/>
<property name="ts.home" value="${jaftck.basedir}"/>
<property file="${ts.home}/lib/jaf.jte"/>
<property name="dir.sep" value="${file.separator}"/>
<property name="dirsep" value="${file.separator}"/>
<property name="pathsep" value="${path.separator}"/>
<property file="${bin.dir}/ts.jte"/>
<property name="lib.dir" value="${ts.home}${file.separator}lib"/>
<property name="class.dir" value="${ts.home}${file.separator}classes"/>
<property name="tests.dir" value="${ts.home}${file.separator}tests"/>
<property name="work.dir" value="${ts.home}/JTwork"/>
<property name="report.dir" value="${ts.home}/JTreport"/>
<mkdir dir="${class.dir}"/>
<mkdir dir="${work.dir}"/>
<mkdir dir="${report.dir}"/>
<condition property="tests.arg" value="-tests ${tests}" else="">
<isset property="tests"/>
</condition>
<condition property="tests.debug" value="-D" else="">
<isset property="debug"/>
</condition>
<property name="class.path" value="${class.dir}${pathsep}${ts.home}/sigtest.jar${pathsep}${ts.home}/javatest.jar${pathsep}${JARPATH}/javax.activation.jar"/>
<condition property="java.classes.for.sig.ext"
value="bundle/Classes/classes.jar"
else="lib/rt.jar">
<and>
<os family="mac"/>
<or>
<contains string="${java.version}" substring="1.6" />
<contains string="${java.version}" substring="1.5" />
<contains string="${java.version}" substring="1.4" />
</or>
</and>
</condition>
<target name="build"
description="Compiles all sources to the classes directory">
<javac includeantruntime="false" deprecation="yes"
source="9" target="9"
optimize="true" srcdir="tests"
classpath="${class.path}" destdir="${class.dir}"
debug="on" />
<javac includeantruntime="false" deprecation="yes"
source="9" target="9"
optimize="true" srcdir="harness"
classpath="${class.path}" destdir="${class.dir}"
debug="on" />
</target>
<target name="clean"
description="Cleans all classes from the classes directory">
<delete failonerror="false" includeEmptyDirs="true">
<fileset dir="${class.dir}" includes="*/**"/>
</delete>
</target>
<target name="run"
description="Executes the JAF TCK in batch mode">
<javatest.batch/>
</target>
<target name="gui"
description="Executes the JAF TCK in GUI mode">
<javatest.gui/>
</target>
<target name="record.sigtest">
<java fork="true" jar="./sigtestdev.jar">
<arg value="Setup"/>
<arg value="-Classpath"/>
<arg value="${java.home}/${java.classes.for.sig.ext}${pathsep}${class.path}"/>
<arg value="-Package"/>
<arg value="javax.activation"/>
<arg value="-FileName"/>
<arg value="${ts.home}/tests/javax.activation_${version}_java_${java.specification.version}.sig"/>
<arg value="-Static"/>
</java>
</target>
<presetdef name="javatest">
<!--
The javatest task is a presetdef that sets many of the common
attributes and elements used by both the GUI and batch mode
invocations of javatest with the spider workspace. To see the preset
values, refer to the included XML below that shows the content of
the javatest presetdef.
-->
<java classname="com.sun.javatest.tool.Main"
failonerror="${failOnError}" fork="yes" >
<classpath>
<pathelement path="${class.path}"/>
</classpath>
<sysproperty key="testDebug" value="${tests.debug}"/>
</java>
</presetdef>
<presetdef name="javatest.batch">
<!--
The javatest.batch task is a presetdef that calls the javatest
presetdef passing the additional XML content needed to invoke
javatest in batch mode. To see the preset values, refer to the
included XML below that shows the content of the javatest.batch
presetdef.
-->
<javatest>
<arg line=" -EsysProps" />
<arg line=" -batch" />
<arg line=" -ts tests/testsuite.html" />
<arg line=" -workdir ${work.dir}" />
<arg line=" -envFiles ${ts.home}/lib/jaf.jte" />
<arg line=" -env jafUnix" />
<arg line=" -excludeList ${ts.home}/lib/jaf.jtx" />
<arg line=" -timeoutFactor 1" />
<arg line=" ${tests.arg}" />
<arg line=" -runtests -writereport ${report.dir}"/>
</javatest>
</presetdef>
<presetdef name="javatest.gui">
<!--
The javatest.gui task is a presetdef that calls the javatest presetdef
passing the additional XML content needed to invoke the javatest GUI.
To see the preset values, refer to the included XML below that shows
the content of the javatest.gui presetdef.
-->
<javatest>
<arg line="-open ${ts.home}/lib/jaf.jti" />
<arg line="-EsysProps" />
</javatest>
</presetdef>
<presetdef name="javatest.help">
<javatest>
<arg line="-help" />
</javatest>
</presetdef>
</project>