blob: 65c9c4344181bcef02268adc83ed8d5937e5ab0f (
plain) (
blame)
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
<!--
Copyright (c) 2010 Stephan Herrmann and others.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Contributors:
Stephan Herrmann - initial API and implementation
-->
<project name="Automated Object Teams Testing" default="all" basedir="." >
<!--properties file containing the build information-->
<property file="src/label.properties" />
<property file="src/finalPluginsVersions.properties" />
<property name="otequinox.agent.jar" value="${test.root.dir}/eclipse/plugins/org.eclipse.objectteams.otequinox_${org.eclipse.objectteams.otequinox}/otequinoxAgent.jar"/>
<property name="junit-report-output" value="${test.root.dir}/results"/>
<target name="setupOTDTEclipse" unless="otdt-eclipse.is.setup"
description="Creates the SUT by and installing the OTDT into a pre-installed base Eclipse"
>
<echo message="Installing OTDT into Test Eclipse..."/>
<ant antfile="${OTScriptDir}/p2helper.xml" target="installOTDT" dir="${test.eclipseDir}"/>
<property name="otdt-eclipse.is.setup" value="true"/>
</target>
<target name="setupTests" depends="setupOTDTEclipse" unless="tests.are.setup"
description="Installes the OTDT-Tests into the OTDT"
>
<echo message="Setting up tests in ${test.eclipseDir}"/>
<!-- do install using p2: -->
<ant antfile="${OTScriptDir}/p2helper.xml" target="installTests" dir="${test.eclipseDir}"/>
<property name="tests.are.setup" value="true"/>
</target>
<target name="runtests"
description="Runs ant on the test.xml for a specified plugin.
The property testPlugin represents a directory name made up of the plugin id and plugin version.
This directory must contain a valid test.xml."
>
<ant antfile="plugins/${testPlugin}/test.xml" dir="${test.eclipseDir}">
<property name="eclipse-home" value="${test.eclipseDir}" />
<property name="library-file" value="${user.dir}/../releng/build-scripts/build/lib/library.xml"/>
<property name="extraVMargs" value="-XX:+HeapDumpOnOutOfMemoryError -ea --add-modules ALL-SYSTEM
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED
--add-opens jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED
--add-opens jdk.localedata/sun.util.resources.provider=ALL-UNNAMED
--add-opens java.security.jgss/sun.security.krb5.internal.ssl=ALL-UNNAMED
--add-opens java.base/jdk.internal.module=ALL-UNNAMED
--add-opens java.base/java.lang.module=ALL-UNNAMED
--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens java.base/jdk.internal.math=ALL-UNNAMED
--add-opens java.base/jdk.internal.misc=ALL-UNNAMED
--add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED
-Djava.io.tmpdir=${test.tmpDir} -Dot.weaving=otdre -javaagent:${otequinox.agent.jar}
-Dcompliance=1.8,11,17,19"/>
</ant>
</target>
<target name="otdt_tests" description="Runs the org.eclipse.objectteams.otdt.tests test.xml">
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.objectteams.otdt.tests_${org.eclipse.objectteams.otdt.tests}" />
</antcall>
</target>
<target name="jdtcore_compiler_tests" description="Runs the org.eclipse.jdt.core.tests.compiler test.xml">
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.jdt.core.tests.compiler_${org.eclipse.jdt.core.tests.compiler}" />
</antcall>
</target>
<target name="jdtcore_model_tests" description="Runs the org.eclipse.jdt.core.tests.model test.xml">
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.jdt.core.tests.model_${org.eclipse.jdt.core.tests.model}" />
</antcall>
</target>
<target name="jdt_builder_tests" description="Runs the org.eclipse.jdt.core.tests.builder test.xml">
<property name="library-file"
value="${test.root.dir}/library.xml"/>
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.jdt.core.tests.builder_${org.eclipse.jdt.core.tests.builder}" />
</antcall>
</target>
<target name="otdt_ui_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests test.xml">
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.objectteams.otdt.ui.tests_${org.eclipse.objectteams.otdt.ui.tests}" />
</antcall>
</target>
<target name="otdt_dom_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests.dom test.xml">
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.objectteams.otdt.ui.tests.dom_${org.eclipse.objectteams.otdt.ui.tests.dom}" />
</antcall>
</target>
<target name="otdt_ref_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests.refactoring test.xml">
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.objectteams.otdt.ui.tests.refactoring_${org.eclipse.objectteams.otdt.ui.tests.refactoring}" />
</antcall>
</target>
<target name="otequinox_tests" description="Runs the OTEquinoxTests test.xml">
<antcall target="runtests">
<param name="testPlugin" value="OTEquinoxTests_${OTEquinoxTests}" />
</antcall>
</target>
<target name="jdt_ui_tests" description="Runs the org.eclipse.jdt.ui.tests test.xml">
<property name="library-file"
value="${test.root.dir}/library.xml"/>
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.jdt.ui.tests_${org.eclipse.jdt.ui.tests}" />
</antcall>
</target>
<target name="jdt_ref_tests" description="Runs the org.eclipse.jdt.ui.tests.refactoring test.xml">
<property name="library-file"
value="${test.root.dir}/library.xml"/>
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.jdt.ui.tests.refactoring_${org.eclipse.jdt.ui.tests.refactoring}" />
</antcall>
</target>
<target name="jdt_debug_tests" description="Runs the org.eclipse.jdt.debug.tests test.xml">
<property name="library-file"
value="${test.root.dir}/library.xml"/>
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.jdt.debug.tests_${org.eclipse.jdt.debug.tests}" />
</antcall>
</target>
<target name="otdt_debug_tests" description="Runs the org.eclipse.objectteams.otdt.debug.tests test.xml">
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.objectteams.otdt.debug.tests_${org.eclipse.objectteams.otdt.debug.tests}" />
</antcall>
</target>
<target name="otdt_builder_tests" description="Runs the org.eclipse.objectteams.otdt.test.builder test.xml">
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.objectteams.otdt.test.builder_${org.eclipse.objectteams.otdt.test.builder}" />
</antcall>
</target>
<target name="all">
<!-- enable if we want to debug otre/otequinox:
<property name="extraVMargs" value="-Dot.dump=1 -Dotequinox.debug=OK" />
-->
<!-- debug tests don't like parallelization -->
<antcall target="jdt_debug_tests" />
<antcall target="otdt_debug_tests" />
<!--parallel threadCount="2"-->
<!-- "slow", ui tests come first -->
<antcall target="jdt_ref_tests" />
<antcall target="jdt_ui_tests" />
<antcall target="otdt_ui_tests" />
<antcall target="otdt_ref_tests" />
<antcall target="otdt_dom_tests" />
<antcall target="otdt_tests" />
<antcall target="otequinox_tests" />
<antcall target="otdt_builder_tests" />
<antcall target="jdt_builder_tests" />
<antcall target="jdtcore_compiler_tests" />
<antcall target="jdtcore_model_tests" />
<!-- antcall target="otdt_metrics_tests" / -->
<!--/parallel-->
</target>
<target name="otdt-tests">
<!-- enable if we want to debug otre/otequinox:
<property name="extraVMargs" value="-Dot.dump=1 -Dotequinox.debug=OK" />
-->
<!-- debug tests don't like parallelization -->
<antcall target="otdt_debug_tests" />
<!--parallel threadCount="2"-->
<!-- "slow", ui tests come first -->
<antcall target="otdt_ui_tests" />
<antcall target="otdt_ref_tests" />
<antcall target="otdt_dom_tests" />
<antcall target="otdt_tests" />
<antcall target="otequinox_tests" />
<antcall target="otdt_builder_tests" />
<antcall target="jdt_builder_tests" />
<antcall target="jdtcore_compiler_tests" />
<antcall target="jdtcore_model_tests" />
<!-- antcall target="otdt_metrics_tests" / -->
<!--/parallel-->
</target>
<target name="onlyone">
<antcall target="otdt_tests" />
</target>
</project>
|